Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: allow embedding wadm #548

Merged

Conversation

brooksmtownsend
Copy link
Member

@brooksmtownsend brooksmtownsend commented Jan 17, 2025

Feature or Problem

This PR reorganizes most of the code from src/main.rs to be under the wadm crate instead so that Rust developers can embed wadm into their own library. This is primarily useful with the start_wadm function, which can be called with a WadmConfig struct with all wadm configuration options. If using in a CLI, the cli feature should be enabled in the wadm crate to enable the clap attributes to work.

Related Issues

Required for wasmCloud/wasmCloud#1061

Release Information

wadm-cli 0.20.0
wadm 0.20.0

Consumer Impact

Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

@brooksmtownsend brooksmtownsend force-pushed the refactor/for-embedding-wadm branch from 9996d95 to 58e60a7 Compare January 17, 2025 17:25
@brooksmtownsend brooksmtownsend force-pushed the refactor/for-embedding-wadm branch from 58e60a7 to 472dd32 Compare January 17, 2025 17:31
@brooksmtownsend brooksmtownsend force-pushed the refactor/for-embedding-wadm branch from f2f3235 to 7507a8d Compare January 17, 2025 17:43
@brooksmtownsend brooksmtownsend force-pushed the refactor/for-embedding-wadm branch from 7507a8d to 7e81163 Compare January 17, 2025 17:48
Signed-off-by: Brooks Townsend <[email protected]>
Signed-off-by: Brooks Townsend <[email protected]>
@brooksmtownsend brooksmtownsend force-pushed the refactor/for-embedding-wadm branch from 3b97de7 to 228873b Compare January 17, 2025 18:44
Copy link
Contributor

@thomastaylor312 thomastaylor312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly nits but one minor concern around public functions in one of the moved files

crates/wadm/src/lib.rs Outdated Show resolved Hide resolved
crates/wadm/src/lib.rs Outdated Show resolved Hide resolved
crates/wadm/src/nats.rs Outdated Show resolved Hide resolved
@brooksmtownsend brooksmtownsend merged commit 64e3d93 into wasmCloud:main Jan 17, 2025
5 checks passed
@brooksmtownsend brooksmtownsend deleted the refactor/for-embedding-wadm branch January 17, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants