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

Method module_name

crates/c-api/include/wasmtime/trap.hh:50–56  ·  view source on GitHub ↗

Returns the name, if present, associated with this function's module. Note that this requires that the `name` section is present in the original WebAssembly binary.

Source from the content-addressed store, hash-verified

48 /// Note that this requires that the `name` section is present in the original
49 /// WebAssembly binary.
50 std::optional<std::string_view> module_name() const {
51 const auto *name = wasmtime_frame_module_name(frame);
52 if (name != nullptr) {
53 return std::string_view(name->data, name->size);
54 }
55 return std::nullopt;
56 }
57};
58
59/**

Callers 1

TESTFunction · 0.80

Calls 1

Tested by 1

TESTFunction · 0.64