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

Function make_env

tests/all/epoch_interruption.rs:15–32  ·  view source on GitHub ↗
(engine: &Engine)

Source from the content-addressed store, hash-verified

13}
14
15fn make_env<T: 'static>(engine: &Engine) -> Linker<T> {
16 let mut linker = Linker::new(engine);
17 let engine = engine.clone();
18
19 linker
20 .func_new(
21 "",
22 "bump_epoch",
23 FuncType::new(&engine, None, None),
24 move |_caller, _params, _results| {
25 engine.increment_epoch();
26 Ok(())
27 },
28 )
29 .unwrap();
30
31 linker
32}
33
34enum InterruptMode {
35 Trap,

Callers

nothing calls this directly

Calls 6

OkFunction · 0.85
newFunction · 0.50
cloneMethod · 0.45
unwrapMethod · 0.45
func_newMethod · 0.45
increment_epochMethod · 0.45

Tested by

no test coverage detected