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

Method define

cranelift/module/src/data_context.rs:109–112  ·  view source on GitHub ↗

Define an object initialized with the given contents. TODO: Can we avoid a Box here?

(&mut self, contents: Box<[u8]>)

Source from the content-addressed store, hash-verified

107 ///
108 /// TODO: Can we avoid a Box here?
109 pub fn define(&mut self, contents: Box<[u8]>) {
110 debug_assert_eq!(self.init, Init::Uninitialized);
111 self.init = Init::Bytes { contents };
112 }
113
114 /// Override the segment/section for data, only supported on Object backend
115 pub fn set_segment_section(&mut self, seg: &str, sec: &str, macho_flags: u32) {

Calls

no outgoing calls

Tested by 4

basic_data_contextFunction · 0.36
empty_data_objectFunction · 0.36
link_twice_badFunction · 0.36