File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,8 @@ webc_runner_rt_dproxy = [
202202 " tower-http" ,
203203 " journal" ,
204204]
205-
205+ # the minimal wasip1 implementation
206+ wasi-common = [" wasmer/sys" , " sys-thread" , " tokio/fs" ]
206207sys = [
207208 " webc/mmap" ,
208209 " time" ,
Original file line number Diff line number Diff line change 1414//! [WASI plugin example](https://github.com/wasmerio/wasmer/blob/main/examples/plugin.rs)
1515//! for an example of how to extend WASI using the WASI FS API.
1616
17- #[ cfg( all( not( feature = "sys" ) , not( feature = "js" ) ) ) ]
18- compile_error ! ( "At least the `sys` or the `js` feature must be enabled. Please, pick one." ) ;
17+ #[ cfg( all(
18+ not( feature = "sys" ) ,
19+ not( feature = "js" ) ,
20+ not( feature = "wasi-common" )
21+ ) ) ]
22+ compile_error ! (
23+ "At least the `sys` or the `js` or `wasi-common` feature must be enabled. Please, pick one."
24+ ) ;
1925
20- #[ cfg( all( feature = "sys" , feature = "js" ) ) ]
26+ #[ cfg( all( feature = "sys" , feature = "js" , feature = "wasi-common" ) ) ]
2127compile_error ! (
22- "Cannot have both `sys` and `js` features enabled at the same time. Please, pick one."
28+ "Cannot have both `sys` and `js` and `wasi-common` features enabled at the same time. Please, pick one."
2329) ;
2430
2531#[ cfg( all( feature = "sys" , target_arch = "wasm32" ) ) ]
Original file line number Diff line number Diff line change 11mod global;
22mod thread_local;
33
4- #[ cfg( feature = "sys" ) ]
4+ #[ cfg( any ( feature = "sys" , feature = "wasi-common" ) ) ]
55pub ( crate ) use global:: * ;
66#[ cfg( feature = "js" ) ]
77pub ( crate ) use thread_local:: * ;
Original file line number Diff line number Diff line change 1- #![ cfg_attr( feature = "sys" , allow( unused) ) ]
1+ #![ cfg_attr( any ( feature = "sys" , feature= "wasi-common" ) , allow( unused) ) ]
22use std:: cell:: { Ref , RefCell , RefMut } ;
33use std:: ops:: { Deref , DerefMut } ;
44use std:: {
You can’t perform that action at this time.
0 commit comments