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
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ jobs:
run: |
cargo build --all-features --all-targets --workspace

# Make sure the wadm crate works well with feature combinations
# The above command builds the workspace and tests with no features
- name: Check wadm crate with features
run: |
cargo check -p wadm --no-default-features
cargo check -p wadm --features cli
cargo check -p wadm --features http_admin
cargo check -p wadm --features cli,http_admin

# Run all tests
- name: Run tests
run: |
Expand Down
17 changes: 8 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 7 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ keywords = ["webassembly", "wasmcloud", "wadm"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/wasmcloud/wadm"
default-run = "wadm"

[workspace.package]
version = "0.19.0"
version = "0.20.0"

[features]
default = []
Expand All @@ -22,16 +23,7 @@ members = ["crates/*"]

[dependencies]
anyhow = { workspace = true }
async-nats = { workspace = true }
async-trait = { workspace = true }
bytes = { workspace = true }
clap = { workspace = true, features = ["derive", "cargo", "env"] }
futures = { workspace = true }
http = { workspace = true, features = ["std"] }
http-body-util = { workspace = true }
hyper = { workspace = true }
hyper-util = { workspace = true, features = ["server"] }
nkeys = { workspace = true }
# One version back to avoid clashes with 0.10 of otlp
opentelemetry = { workspace = true, features = ["rt-tokio"] }
# 0.10 to avoid protoc dep
Expand All @@ -45,8 +37,7 @@ tokio = { workspace = true, features = ["full"] }
tracing = { workspace = true, features = ["log"] }
tracing-opentelemetry = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
wasmcloud-control-interface = { workspace = true }
wadm = { workspace = true }
wadm = { workspace = true, features = ["cli", "http_admin"] }
wadm-types = { workspace = true }

[workspace.dependencies]
Expand Down Expand Up @@ -92,7 +83,7 @@ tracing-subscriber = { version = "0.3.7", features = ["env-filter", "json"] }
ulid = { version = "1", features = ["serde"] }
utoipa = "5"
uuid = "1"
wadm = { version = "0.19.0", path = "./crates/wadm" }
wadm = { version = "0.20.0", path = "./crates/wadm"}
wadm-client = { version = "0.8.0", path = "./crates/wadm-client" }
wadm-types = { version = "0.8.0", path = "./crates/wadm-types" }
wasmcloud-control-interface = { version = "2.2.0" }
Expand All @@ -101,13 +92,16 @@ wit-bindgen-wrpc = { version = "0.9", default-features = false }
wit-bindgen = { version = "0.36.0", default-features = false }

[dev-dependencies]
async-nats = { workspace = true }
chrono = { workspace = true }
futures = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true }
serial_test = "3"
wadm-client = { workspace = true }
wadm-types = { workspace = true }
wasmcloud-control-interface = { workspace = true }
testcontainers = "0.23"

[build-dependencies]
Expand Down
12 changes: 12 additions & 0 deletions crates/wadm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ license = "Apache-2.0"
readme = "../../README.md"
repository = "https://github.com/wasmcloud/wadm"

[features]
# Enables clap attributes on the wadm configuration struct
cli = ["clap"]
http_admin = ["http", "http-body-util", "hyper", "hyper-util"]
default = []

[package.metadata.cargo-machete]
ignored = ["cloudevents-sdk"]

Expand All @@ -17,9 +23,15 @@ anyhow = { workspace = true }
async-nats = { workspace = true }
async-trait = { workspace = true }
chrono = { workspace = true }
clap = { workspace = true, optional = true, features = ["derive", "cargo", "env"]}
cloudevents-sdk = { workspace = true }
http = { workspace = true, features = ["std"], optional = true }
http-body-util = { workspace = true, optional = true }
hyper = { workspace = true, optional = true }
hyper-util = { workspace = true, features = ["server"], optional = true }
futures = { workspace = true }
indexmap = { workspace = true, features = ["serde"] }
nkeys = { workspace = true }
semver = { workspace = true, features = ["serde"] }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down
Loading