Skip to content

Commit

Permalink
feat: add lib.rs with gated child crates
Browse files Browse the repository at this point in the history
This allows for Wasm Workers Consumers to depend on the toplevel WWS
crate as a library, gating different features behind cargo features.
  • Loading branch information
ereslibre committed Jul 31, 2023
1 parent 27ce361 commit 0f40272
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ wws-project = { workspace = true }
reqwest = { version = "0.11", features = ["blocking"] }

[features]
default = ["all"]
all = ["wws_config", "wws_router", "wws_server"]
wws_config = []
wws_router = []
wws_server = []

vendored-openssl = ["wws-project/vendored-openssl"]

[workspace]
Expand Down
9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2023 VMware, Inc.
// SPDX-License-Identifier: Apache-2.0

#[cfg(feature = "wws_config")]
pub use wws_config;
#[cfg(feature = "wws_router")]
pub use wws_router;
#[cfg(feature = "wws_server")]
pub use wws_server;

0 comments on commit 0f40272

Please sign in to comment.