Make WASI and wat support optional in the C API (#1419)
Add some crate features to compile out support for these features of the C API. Avoiding these two features if they're not necessary shaves about 2MB off the final shared object in some local tests!
This commit is contained in:
@@ -21,8 +21,6 @@ mod trap;
|
||||
mod types;
|
||||
mod val;
|
||||
mod vec;
|
||||
mod wasi;
|
||||
mod wat2wasm;
|
||||
|
||||
pub use crate::config::*;
|
||||
pub use crate::engine::*;
|
||||
@@ -40,7 +38,15 @@ pub use crate::trap::*;
|
||||
pub use crate::types::*;
|
||||
pub use crate::val::*;
|
||||
pub use crate::vec::*;
|
||||
|
||||
#[cfg(feature = "wasi")]
|
||||
mod wasi;
|
||||
#[cfg(feature = "wasi")]
|
||||
pub use crate::wasi::*;
|
||||
|
||||
#[cfg(feature = "wat")]
|
||||
mod wat2wasm;
|
||||
#[cfg(feature = "wat")]
|
||||
pub use crate::wat2wasm::*;
|
||||
|
||||
#[repr(C)]
|
||||
|
||||
Reference in New Issue
Block a user