Skip to content

Commit

Permalink
fix(api) Use the sys feature when no default features is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Jul 23, 2021
1 parent 8a5caa3 commit 36c4f92
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions lib/api/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#[cfg(all(not(feature = "sys"), not(feature = "js")))]
compile_error!("At least the `sys` or the `js` feature must be enabled. Please, pick one.");

#[cfg(all(feature = "sys", feature = "js"))]
compile_error!(
"Cannot have both `sys` and `js` features enabled at the same time. Please, pick one."
Expand Down
2 changes: 1 addition & 1 deletion lib/cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ readme = "README.md"
edition = "2018"

[dependencies]
wasmer = { path = "../api", version = "2.0.0", default-features = false }
wasmer = { path = "../api", version = "2.0.0", default-features = false, features = ["sys"] }
hex = "0.4"
thiserror = "1"
blake3 = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion lib/emscripten/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lazy_static = "1.4"
libc = "^0.2"
log = "0.4"
time = "0.1"
wasmer = { path = "../api", version = "2.0.0", default-features = false }
wasmer = { path = "../api", version = "2.0.0", default-features = false, features = ["sys"] }

[target.'cfg(windows)'.dependencies]
getrandom = "0.2"
2 changes: 1 addition & 1 deletion lib/wasi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ getrandom = "0.2"
typetag = "0.1"
serde = { version = "1.0", features = ["derive"] }
wasmer-wasi-types = { path = "../wasi-types", version = "2.0.0" }
wasmer = { path = "../api", version = "2.0.0", default-features = false }
wasmer = { path = "../api", version = "2.0.0", default-features = false, features = ["sys"] }

[target.'cfg(windows)'.dependencies]
winapi = "0.3"
Expand Down

0 comments on commit 36c4f92

Please sign in to comment.