Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/wasix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ webc_runner_rt_dproxy = [
"tower-http",
"journal",
]

# the minimal sys implementation
sys-minimal = ["wasmer/sys", "sys-thread", "tokio/fs"]
sys = [
"webc/mmap",
"time",
Expand Down
17 changes: 13 additions & 4 deletions lib/wasix/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,21 @@
//! [WASI plugin example](https://github.com/wasmerio/wasmer/blob/main/examples/plugin.rs)
//! for an example of how to extend WASI using the WASI FS API.

#[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(
not(feature = "sys"),
not(feature = "js"),
not(feature = "sys-minimal")
))]
compile_error!(
"At least the `sys` or the `js` or `sys-minimal` feature must be enabled. Please, pick one."
);

#[cfg(all(feature = "sys", feature = "js"))]
#[cfg(any(
all(feature = "js", feature = "sys"),
all(feature = "js", feature = "sys-minimal")
))]
compile_error!(
"Cannot have both `sys` and `js` features enabled at the same time. Please, pick one."
"Cannot have both `sys` and `js` or `sys-minimal` and `sys` features enabled at the same time. Please, pick one."
);

#[cfg(all(feature = "sys", target_arch = "wasm32"))]
Expand Down
2 changes: 1 addition & 1 deletion lib/wasix/src/state/handles/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod global;
mod thread_local;

#[cfg(feature = "sys")]
#[cfg(any(feature = "sys", feature = "sys-minimal"))]
pub(crate) use global::*;
#[cfg(feature = "js")]
pub(crate) use thread_local::*;
2 changes: 1 addition & 1 deletion lib/wasix/src/state/handles/thread_local.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg_attr(feature = "sys", allow(unused))]
#![cfg_attr(any(feature = "sys", feature = "sys-minimal"), allow(unused))]
use std::cell::{Ref, RefCell, RefMut};
use std::ops::{Deref, DerefMut};
use std::{
Expand Down
Loading