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

Method fmt

crates/wasmtime/src/config.rs:3336–3360  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter)

Source from the content-addressed store, hash-verified

3334
3335impl fmt::Debug for Config {
3336 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3337 let mut f = f.debug_struct("Config");
3338
3339 // Not every flag in WasmFeatures can be enabled as part of creating
3340 // a Config. This impl gives a complete picture of all WasmFeatures
3341 // enabled, and doesn't require maintenance by hand (which has become out
3342 // of date in the past), at the cost of possible confusion for why
3343 // a flag in this set doesn't have a Config setter.
3344 let features = self.features();
3345 for flag in WasmFeatures::FLAGS.iter() {
3346 f.field(
3347 &format!("wasm_{}", flag.name().to_lowercase()),
3348 &features.contains(*flag.value()),
3349 );
3350 }
3351
3352 f.field("parallel_compilation", &self.parallel_compilation);
3353 #[cfg(any(feature = "cranelift", feature = "winch"))]
3354 {
3355 f.field("compiler_config", &self.compiler_config);
3356 }
3357
3358 self.tunables.format(&mut f);
3359 f.finish()
3360 }
3361}
3362
3363/// Possible Compilation strategies for a wasm module.

Callers

nothing calls this directly

Calls 7

featuresMethod · 0.45
iterMethod · 0.45
fieldMethod · 0.45
containsMethod · 0.45
valueMethod · 0.45
formatMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected