Skip to content

Commit f4e13a4

Browse files
committed
feat: add lib.rs with gated child crates
This allows for Wasm Workers Consumers to depend on the toplevel WWS crate as a library, gating different features behind cargo features.
1 parent 0f5404b commit f4e13a4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ wws-project = { workspace = true }
3737
reqwest = { version = "0.11", features = ["blocking"] }
3838

3939
[features]
40+
default = ["all"]
41+
all = ["wws_config", "wws_router", "wws_server"]
42+
wws_config = []
43+
wws_router = []
44+
wws_server = []
45+
4046
vendored-openssl = ["wws-project/vendored-openssl"]
4147

4248
[workspace]

src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright 2023 VMware, Inc.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#[cfg(feature = "wws_config")]
5+
pub use wws_config;
6+
#[cfg(feature = "wws_router")]
7+
pub use wws_router;
8+
#[cfg(feature = "wws_server")]
9+
pub use wws_server;

0 commit comments

Comments
 (0)