Add a compile command to Wasmtime.
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 ```
This commit is contained in:
@@ -10,7 +10,9 @@ pub mod ir {
|
||||
}
|
||||
|
||||
pub mod settings {
|
||||
pub use cranelift_codegen::settings::{builder, Builder, Configurable, Flags, SetError};
|
||||
pub use cranelift_codegen::settings::{
|
||||
builder, Builder, Configurable, Flags, OptLevel, SetError,
|
||||
};
|
||||
}
|
||||
|
||||
pub mod isa {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Tunable parameters for WebAssembly compilation.
|
||||
#[derive(Clone, Hash)]
|
||||
#[derive(Clone, Hash, Serialize, Deserialize)]
|
||||
pub struct Tunables {
|
||||
/// For static heaps, the size in wasm pages of the heap protected by bounds checking.
|
||||
pub static_memory_bound: u32,
|
||||
|
||||
Reference in New Issue
Block a user