MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / check_features

Method check_features

crates/wasmtime/src/engine/serialization.rs:439–450  ·  view source on GitHub ↗
(&mut self, other: &wasmparser::WasmFeatures)

Source from the content-addressed store, hash-verified

437 }
438
439 fn check_features(&mut self, other: &wasmparser::WasmFeatures) -> Result<()> {
440 let module_features = wasmparser::WasmFeatures::from_bits_truncate(self.features);
441 let missing_features = (*other & module_features) ^ module_features;
442 for (name, _) in missing_features.iter_names() {
443 let name = name.to_ascii_lowercase();
444 bail!(
445 "Module was compiled with support for WebAssembly feature \
446 `{name}` but it is not enabled for the host",
447 );
448 }
449 Ok(())
450 }
451
452 fn check_collector(
453 module: Option<wasmtime_environ::Collector>,

Callers 1

check_compatibleMethod · 0.80

Calls 1

OkFunction · 0.85

Tested by

no test coverage detected