mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-21 12:41:32 +00:00
Add export_func macro, prelude, and rename imports stuff
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
extern crate field_offset;
|
||||
|
||||
#[macro_use]
|
||||
pub mod macros;
|
||||
mod macros;
|
||||
#[doc(hidden)]
|
||||
pub mod backend;
|
||||
mod backing;
|
||||
@ -29,6 +29,17 @@ pub use self::instance::Instance;
|
||||
pub use self::module::Module;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub mod prelude {
|
||||
pub use crate::export_func;
|
||||
pub use crate::import::{ImportObject, Namespace};
|
||||
pub use crate::types::{
|
||||
FuncIndex, GlobalIndex, ImportedFuncIndex, ImportedGlobalIndex, ImportedMemoryIndex,
|
||||
ImportedTableIndex, LocalFuncIndex, LocalGlobalIndex, LocalMemoryIndex, LocalTableIndex,
|
||||
MemoryIndex, TableIndex, Type, Value,
|
||||
};
|
||||
pub use crate::vm;
|
||||
}
|
||||
|
||||
/// Compile a webassembly module using the provided compiler.
|
||||
pub fn compile(wasm: &[u8], compiler: &dyn backend::Compiler) -> CompileResult<module::Module> {
|
||||
let token = backend::Token::generate();
|
||||
|
Reference in New Issue
Block a user