This commit refactors module instantiation in the runtime to allow for different instance allocation strategy implementations. It adds an `InstanceAllocator` trait with the current implementation put behind the `OnDemandInstanceAllocator` struct. The Wasmtime API has been updated to allow a `Config` to have an instance allocation strategy set which will determine how instances get allocated. This change is in preparation for an alternative *pooling* instance allocator that can reserve all needed host process address space in advance. This commit also makes changes to the `wasmtime_environ` crate to represent compiled modules in a way that reduces copying at instantiation time.
29 lines
781 B
Rust
29 lines
781 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, 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::*;
|
|
}
|