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

Method symbol

cranelift/jit/src/backend.rs:115–121  ·  view source on GitHub ↗

Define a symbol in the internal symbol table. The JIT will use the symbol table to resolve names that are declared, but not defined, in the module being compiled. A common example is external functions. With this method, functions and data can be exposed to the code being compiled which are defined by the host. If a symbol is defined more than once, the most recent definition will be retained.

(&mut self, name: K, ptr: *const u8)

Source from the content-addressed store, hash-verified

113 /// the current process for public symbols, followed by searching the
114 /// platform's C runtime).
115 pub fn symbol<K>(&mut self, name: K, ptr: *const u8) -> &mut Self
116 where
117 K: Into<String>,
118 {
119 self.symbols.insert(name.into(), SendWrapper(ptr));
120 self
121 }
122
123 /// Define multiple symbols in the internal symbol table.
124 ///

Callers 1

get_symbolMethod · 0.80

Calls 2

SendWrapperClass · 0.85
insertMethod · 0.45

Tested by

no test coverage detected