This commit adds a `compile` command to the Wasmtime CLI. The command can be used to Ahead-Of-Time (AOT) compile WebAssembly modules. With the `all-arch` feature enabled, AOT compilation can be performed for non-native architectures (i.e. cross-compilation). The `Module::compile` method has been added to perform AOT compilation. A few of the CLI flags relating to "on by default" Wasm features have been changed to be "--disable-XYZ" flags. A simple example of using the `wasmtime compile` command: ```text $ wasmtime compile input.wasm $ wasmtime input.cwasm ```
31 lines
806 B
Rust
31 lines
806 B
Rust
#![doc(hidden)]
|
|
|
|
pub mod ir {
|
|
pub use cranelift_codegen::binemit::{Reloc, StackMap};
|
|
pub use cranelift_codegen::ir::{
|
|
types, AbiParam, ArgumentPurpose, JumpTableOffsets, LabelValueLoc, LibCall, Signature,
|
|
SourceLoc, StackSlots, TrapCode, Type, ValueLabel, ValueLoc,
|
|
};
|
|
pub use cranelift_codegen::{ValueLabelsRanges, ValueLocRange};
|
|
}
|
|
|
|
pub mod settings {
|
|
pub use cranelift_codegen::settings::{
|
|
builder, Builder, Configurable, Flags, OptLevel, SetError,
|
|
};
|
|
}
|
|
|
|
pub mod isa {
|
|
pub use cranelift_codegen::isa::{
|
|
unwind, Builder, CallConv, RegUnit, TargetFrontendConfig, TargetIsa,
|
|
};
|
|
}
|
|
|
|
pub mod entity {
|
|
pub use cranelift_entity::{packed_option, BoxedSlice, EntityRef, EntitySet, PrimaryMap};
|
|
}
|
|
|
|
pub mod wasm {
|
|
pub use cranelift_wasm::*;
|
|
}
|