Add a method to share Config across machines (#2608)
With `Module::{serialize,deserialize}` it should be possible to share
wasmtime modules across machines or CPUs. Serialization, however, embeds
a hash of all configuration values, including cranelift compilation
settings. By default wasmtime's selection of the native ISA would enable
ISA flags according to CPU features available on the host, but the same
CPU features may not be available across two machines.
This commit adds a `Config::cranelift_clear_cpu_flags` method which
allows clearing the target-specific ISA flags that are automatically
inferred by default for the native CPU. Options can then be
incrementally built back up as-desired with teh `cranelift_other_flag`
method.
This commit is contained in:
@@ -188,7 +188,7 @@ pub type SetResult<T> = Result<T, SetError>;
|
||||
/// The settings objects themselves are generated and appear in the `isa/*/settings.rs` modules.
|
||||
/// Each settings object provides a `predicate_view()` method that makes it possible to query
|
||||
/// ISA predicates by number.
|
||||
#[derive(Clone, Copy)]
|
||||
#[derive(Clone, Copy, Hash)]
|
||||
pub struct PredicateView<'a>(&'a [u8]);
|
||||
|
||||
impl<'a> PredicateView<'a> {
|
||||
|
||||
Reference in New Issue
Block a user