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

Method declare_anonymous_data

cranelift/module/src/module.rs:812–820  ·  view source on GitHub ↗

Declare an anonymous data object in this module.

(&mut self, writable: bool, tls: bool)

Source from the content-addressed store, hash-verified

810
811 /// Declare an anonymous data object in this module.
812 pub fn declare_anonymous_data(&mut self, writable: bool, tls: bool) -> ModuleResult<DataId> {
813 let id = self.data_objects.push(DataDeclaration {
814 name: None,
815 linkage: Linkage::Local,
816 writable,
817 tls,
818 });
819 Ok(id)
820 }
821}
822
823/// A `Module` is a utility for collecting functions and data objects, and linking them together.

Callers

nothing calls this directly

Calls 2

OkFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected