Skip to content

Commit 732a068

Browse files
committed
chore: rework top-level features
Signed-off-by: Roman Volosatovs <[email protected]>
1 parent d19bf22 commit 732a068

File tree

6 files changed

+16
-25
lines changed

6 files changed

+16
-25
lines changed

Cargo.lock

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
description = "WebAssembly component-native RPC framework based on WIT"
33
name = "wrpc"
4-
version = "0.13.0"
4+
version = "0.14.0"
55

66
authors.workspace = true
77
categories.workspace = true
@@ -22,33 +22,29 @@ repository = "https://github.com/bytecodealliance/wrpc"
2222
members = ["crates/*", "examples/rust/*"]
2323

2424
[features]
25-
default = ["bin", "nats", "quic", "wasmtime"]
25+
default = ["bin", "nats", "net", "quic", "wasmtime"]
2626

27-
bin = [
27+
bin = ["bin-bindgen", "bin-wasmtime"]
28+
bin-bindgen = [
2829
"dep:clap",
29-
"dep:serde",
30-
"dep:serde_json",
31-
"dep:tokio",
3230
"dep:wit-bindgen-core",
3331
"dep:wit-bindgen-wrpc-go",
34-
"dep:wrpc-cli",
35-
"dep:wrpc-wasmtime-cli",
36-
"tokio/rt-multi-thread",
37-
"tokio/sync",
3832
"wit-bindgen-wrpc-go/clap",
3933
"wit-bindgen-wrpc-rust/clap",
4034
]
35+
bin-wasmtime = ["dep:tokio", "dep:wrpc-wasmtime-cli", "tokio/rt-multi-thread"]
4136
nats = ["dep:async-nats", "dep:wrpc-transport-nats", "wrpc-cli/nats"]
37+
net = ["wrpc-transport/net"]
4238
quic = ["dep:wrpc-transport-quic"]
4339
wasmtime = ["dep:wrpc-runtime-wasmtime"]
4440

4541
[[bin]]
4642
name = "wit-bindgen-wrpc"
47-
required-features = ["bin"]
43+
required-features = ["bin-bindgen"]
4844

4945
[[bin]]
5046
name = "wrpc-wasmtime"
51-
required-features = ["bin", "nats", "wasmtime"]
47+
required-features = ["bin-wasmtime"]
5248

5349
[[bench]]
5450
name = "bench"
@@ -66,8 +62,6 @@ clap = { workspace = true, features = [
6662
"suggestions",
6763
"usage",
6864
], optional = true }
69-
serde = { workspace = true, optional = true }
70-
serde_json = { workspace = true, optional = true }
7165
tokio = { workspace = true, optional = true }
7266
tracing = { workspace = true, features = ["attributes"] }
7367
wit-bindgen-core = { workspace = true, optional = true }

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ pub mod runtime {
2020
}
2121

2222
pub use transport::{Index, Invoke, Serve};
23-
pub use wit_bindgen_wrpc::generate;

tests/common/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use tracing::info;
88
pub async fn assert_async<C: Default>(
99
client: &impl wrpc_transport::Invoke<Context = C>,
1010
) -> anyhow::Result<()> {
11-
wrpc::generate!({
11+
wit_bindgen_wrpc::generate!({
1212
world: "async-client",
1313
path: "tests/wit",
1414
});

tests/go.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async fn go_bindgen() -> anyhow::Result<()> {
4343

4444
wrpc_test::with_nats(|port, nats_client| async move {
4545
mod bindings {
46-
wrpc::generate!({
46+
wit_bindgen_wrpc::generate!({
4747
world: "sync-client",
4848
path: "tests/wit",
4949
additional_derives: [::core::cmp::PartialEq],

tests/rust.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ where
3333
let shutdown_rx = async move { shutdown_rx.await.expect("shutdown sender dropped") }.shared();
3434
try_join!(
3535
async {
36-
wrpc::generate!({
36+
wit_bindgen_wrpc::generate!({
3737
world: "async-server",
3838
path: "tests/wit",
3939
});
@@ -166,7 +166,7 @@ where
166166
.await?
167167
},
168168
async {
169-
wrpc::generate!({
169+
wit_bindgen_wrpc::generate!({
170170
world: "async-client",
171171
path: "tests/wit",
172172
});
@@ -196,7 +196,7 @@ where
196196
try_join!(
197197
async {
198198
mod bindings {
199-
wrpc::generate!({
199+
wit_bindgen_wrpc::generate!({
200200
inline: "
201201
package wrpc-test:integration;
202202
@@ -434,7 +434,7 @@ where
434434
}.instrument(span.clone()),
435435
async {
436436
mod bindings {
437-
wrpc::generate!({
437+
wit_bindgen_wrpc::generate!({
438438
inline: "
439439
package wrpc-test:integration;
440440
@@ -629,7 +629,7 @@ where
629629
}.instrument(span.clone()),
630630
async {
631631
mod bindings {
632-
wrpc::generate!({
632+
wit_bindgen_wrpc::generate!({
633633
inline: "
634634
package wrpc-test:integration;
635635

0 commit comments

Comments
 (0)