Skip to content

Commit

Permalink
Fix wit-component build with few features
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Feb 9, 2024
1 parent 22265ad commit eb0c190
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ rustc-demangle = { version = "0.1.21", optional = true }
cpp_demangle = { version = "0.4.0", optional = true }

# Dependencies of `component`
wit-component = { workspace = true, optional = true, features = ['dummy-module', 'wat'] }
wit-component = { workspace = true, optional = true, features = ['dummy-module', 'wat', 'semver-check'] }
wit-parser = { workspace = true, optional = true }
wast = { workspace = true, optional = true }

Expand Down
1 change: 1 addition & 0 deletions crates/wit-component/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ wasmtime = { workspace = true }
[features]
dummy-module = ['dep:wat']
wat = ['dep:wast', 'dep:wat']
semver-check = ['dummy-module']
7 changes: 5 additions & 2 deletions crates/wit-component/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ mod encoding;
mod gc;
mod linking;
mod printing;
mod semver_check;
mod targets;
mod validation;

pub use decoding::{decode, decode_reader, DecodedWasm};
pub use encoding::{encode, ComponentEncoder};
pub use linking::Linker;
pub use printing::*;
pub use semver_check::*;
pub use targets::*;

pub mod metadata;
Expand All @@ -32,6 +30,11 @@ pub use dummy::dummy_module;
#[cfg(feature = "dummy-module")]
mod dummy;

#[cfg(feature = "semver-check")]
mod semver_check;
#[cfg(feature = "semver-check")]
pub use semver_check::*;

/// Supported string encoding formats.
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StringEncoding {
Expand Down

0 comments on commit eb0c190

Please sign in to comment.