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

Method new

crates/wasmtime/src/engine/serialization.rs:193–202  ·  view source on GitHub ↗
(engine: &Engine)

Source from the content-addressed store, hash-verified

191impl Metadata<'_> {
192 #[cfg(any(feature = "cranelift", feature = "winch"))]
193 pub fn new(engine: &Engine) -> Result<Metadata<'static>> {
194 let compiler = engine.try_compiler()?;
195 Ok(Metadata {
196 target: compiler.triple().to_string().into(),
197 shared_flags: compiler.flags().into(),
198 isa_flags: compiler.isa_flags().into(),
199 tunables: engine.tunables().clone(),
200 features: engine.features().bits(),
201 })
202 }
203
204 fn check_compatible(mut self, engine: &Engine) -> Result<()> {
205 self.check_triple(engine)?;

Callers

nothing calls this directly

Calls 10

OkFunction · 0.85
try_compilerMethod · 0.80
to_stringMethod · 0.45
tripleMethod · 0.45
flagsMethod · 0.45
isa_flagsMethod · 0.45
cloneMethod · 0.45
tunablesMethod · 0.45
bitsMethod · 0.45
featuresMethod · 0.45

Tested by

no test coverage detected