Skip to content

Commit

Permalink
chore: update async-nats
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Feb 26, 2025
1 parent 8a5ef7c commit fe98e1e
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ wrpc-cli = { workspace = true, optional = true }
wrpc-runtime-wasmtime = { workspace = true, optional = true }
wrpc-transport = { workspace = true }
wrpc-transport-nats = { workspace = true, features = [
"async-nats-0_38",
"async-nats-0_39",
], optional = true }
wrpc-transport-quic = { workspace = true, optional = true }
wrpc-transport-web = { workspace = true, optional = true }
Expand Down
5 changes: 4 additions & 1 deletion crates/transport-nats/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ license.workspace = true
repository.workspace = true

[features]
default = ["async-nats-0_38"]
default = ["async-nats-0_39"]

[dependencies]
anyhow = { workspace = true, features = ["std"] }
async-nats-0_39 = { package = "async-nats", version = "0.39", default-features = false, features = [
"ring",
], optional = true }
async-nats-0_38 = { package = "async-nats", version = "0.38", default-features = false, features = [
"ring",
], optional = true }
Expand Down
9 changes: 8 additions & 1 deletion crates/transport-nats/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,25 @@

#[cfg(any(
not(any(
feature = "async-nats-0_39",
feature = "async-nats-0_38",
feature = "async-nats-0_37",
feature = "async-nats-0_36",
)),
all(feature = "async-nats-0_39", feature = "async-nats-0_38"),
all(feature = "async-nats-0_39", feature = "async-nats-0_37"),
all(feature = "async-nats-0_39", feature = "async-nats-0_36"),
all(feature = "async-nats-0_38", feature = "async-nats-0_37"),
all(feature = "async-nats-0_38", feature = "async-nats-0_36"),
all(feature = "async-nats-0_37", feature = "async-nats-0_36"),
))]
compile_error!(
"Either feature \"async-nats-0_38\", \"async-nats-0_37\" or \"async-nats-0_36\" must be enabled for this crate."
"Either feature \"async-nats-0_39\", \"async-nats-0_38\", \"async-nats-0_37\" or \"async-nats-0_36\" must be enabled for this crate."
);

#[cfg(feature = "async-nats-0_39")]
use async_nats_0_39 as async_nats;

#[cfg(feature = "async-nats-0_38")]
use async_nats_0_38 as async_nats;

Expand Down
2 changes: 1 addition & 1 deletion crates/wasmtime-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ wasmtime-wasi = { workspace = true }
wasmtime-wasi-http = { workspace = true }
wit-component = { workspace = true }
wrpc-cli = { workspace = true, features = ["nats"] }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_38"] }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_39"] }
wrpc-transport = { workspace = true, features = ["net"] }
wrpc-runtime-wasmtime = { workspace = true }
2 changes: 1 addition & 1 deletion examples/rust/hello-nats-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ tokio = { workspace = true, features = ["rt-multi-thread"] }
tracing-subscriber = { workspace = true, features = ["ansi", "fmt"] }
url = { workspace = true }
wit-bindgen-wrpc = { workspace = true }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_38"] }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_39"] }
2 changes: 1 addition & 1 deletion examples/rust/hello-nats-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["ansi", "fmt"] }
url = { workspace = true }
wit-bindgen-wrpc = { workspace = true }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_38"] }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_39"] }
2 changes: 1 addition & 1 deletion examples/rust/streams-nats-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ tracing-subscriber = { workspace = true, features = [
] }
url = { workspace = true }
wit-bindgen-wrpc = { workspace = true }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_38"] }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_39"] }
2 changes: 1 addition & 1 deletion examples/rust/streams-nats-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ tracing-subscriber = { workspace = true, features = [
] }
url = { workspace = true }
wit-bindgen-wrpc = { workspace = true }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_38"] }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_39"] }
2 changes: 1 addition & 1 deletion examples/rust/wasi-keyvalue-nats-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ tracing-subscriber = { workspace = true, features = [
"fmt",
] }
url = { workspace = true }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_38"] }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_39"] }
wrpc-wasi-keyvalue = { workspace = true }
2 changes: 1 addition & 1 deletion examples/rust/wasi-keyvalue-nats-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ tracing-subscriber = { workspace = true, features = [
] }
url = { workspace = true }
wrpc-transport = { workspace = true }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_38"] }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_39"] }
wrpc-wasi-keyvalue = { workspace = true }
wrpc-wasi-keyvalue-mem = { workspace = true }
2 changes: 1 addition & 1 deletion examples/web/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ url = { workspace = true }
uuid = { workspace = true, features = ["std", "v7"] }
wit-bindgen-wrpc = { workspace = true }
wrpc-transport = { workspace = true, features = ["net"] }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_38"] }
wrpc-transport-nats = { workspace = true, features = ["async-nats-0_39"] }
wrpc-transport-quic = { workspace = true }
wrpc-transport-web = { workspace = true }
wrpc-wasi-keyvalue = { workspace = true }
Expand Down

0 comments on commit fe98e1e

Please sign in to comment.