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

Method target

crates/wasmtime/src/config.rs:398–403  ·  view source on GitHub ↗

Configures the target platform of this [`Config`]. This method is used to configure the output of compilation in an [`Engine`](crate::Engine). This can be used, for example, to cross-compile from one platform to another. By default, the host target triple is used meaning compiled code is suitable to run on the host. Note that the [`Module`](crate::Module) type can only be created if the target c

(&mut self, target: &str)

Source from the content-addressed store, hash-verified

396 ///
397 /// This method will error if the given target triple is not supported.
398 pub fn target(&mut self, target: &str) -> Result<&mut Self> {
399 self.target =
400 Some(target_lexicon::Triple::from_str(target).map_err(|e| crate::format_err!(e))?);
401
402 Ok(self)
403 }
404
405 /// Enables the incremental compilation cache in Cranelift, using the provided `CacheStore`
406 /// backend for storage.

Callers 15

executeMethod · 0.45
compileMethod · 0.45
assert_invalid_targetFunction · 0.45
test_tail_call_defaultFunction · 0.45
pulley_configFunction · 0.45
compile_craneliftFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 1

OkFunction · 0.85

Tested by 4

test_tail_call_defaultFunction · 0.36
configFunction · 0.36