|
|
@ -3,13 +3,9 @@ |
|
|
|
//! the translation the base addresses of regions of memory that will hold the globals, tables and
|
|
|
|
//! linear memories.
|
|
|
|
|
|
|
|
#![deny(
|
|
|
|
missing_docs, |
|
|
|
trivial_numeric_casts, |
|
|
|
unused_extern_crates, |
|
|
|
unstable_features |
|
|
|
)] |
|
|
|
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)] |
|
|
|
#![warn(unused_import_braces)] |
|
|
|
#![cfg_attr(feature = "std", deny(unstable_features))] |
|
|
|
#![cfg_attr(
|
|
|
|
feature = "clippy", |
|
|
|
plugin(clippy(conf_file = "../../clippy.toml")) |
|
|
@ -31,12 +27,17 @@ |
|
|
|
use_self |
|
|
|
) |
|
|
|
)] |
|
|
|
#![cfg_attr(not(feature = "std"), no_std)] |
|
|
|
#![cfg_attr(not(feature = "std"), feature(alloc))] |
|
|
|
|
|
|
|
extern crate cranelift_codegen; |
|
|
|
extern crate cranelift_entity; |
|
|
|
extern crate cranelift_wasm; |
|
|
|
#[macro_use] |
|
|
|
extern crate memoffset; |
|
|
|
#[cfg(not(feature = "std"))] |
|
|
|
#[macro_use] |
|
|
|
extern crate alloc; |
|
|
|
|
|
|
|
mod compilation; |
|
|
|
mod environ; |
|
|
@ -46,3 +47,10 @@ mod vmcontext; |
|
|
|
pub use compilation::{compile_module, Compilation, Relocation, RelocationTarget, Relocations}; |
|
|
|
pub use environ::{ModuleEnvironment, ModuleTranslation}; |
|
|
|
pub use module::{DataInitializer, Module, TableElements}; |
|
|
|
|
|
|
|
#[cfg(not(feature = "std"))] |
|
|
|
mod std { |
|
|
|
pub use alloc::{string, vec}; |
|
|
|
pub use core::*; |
|
|
|
pub use core::{i32, str, u32}; |
|
|
|
} |
|
|
|