29 lines
529 B
Rust
Raw Normal View History

2019-01-09 01:06:24 -05:00
#[cfg(test)]
#[macro_use]
extern crate field_offset;
2019-01-08 12:09:47 -05:00
#[macro_use]
mod macros;
mod backing;
mod instance;
mod mmap;
2019-01-10 22:59:57 -05:00
mod recovery;
mod sig_registry;
mod sighandler;
2019-01-12 17:52:14 -05:00
pub mod backend;
pub mod export;
pub mod import;
pub mod module;
pub mod memory;
2019-01-09 01:06:24 -05:00
pub mod table;
2019-01-08 12:09:47 -05:00
pub mod types;
pub mod vm;
pub mod vmcalls;
2019-01-12 17:52:14 -05:00
pub use self::instance::Instance;
2019-01-08 12:09:47 -05:00
/// Compile a webassembly module using the provided compiler.
pub fn compile(wasm: &[u8], compiler: &dyn backend::Compiler) -> Result<module::Module, String> {
2019-01-08 12:09:47 -05:00
compiler.compile(wasm)
2019-01-08 21:57:28 -05:00
}