MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / write_32

Method write_32

crates/tinywasm/src/store/memory/vec.rs:183–187  ·  view source on GitHub ↗
(&mut self, base: u64, offset: u64, bytes: [u8; 4])

Source from the content-addressed store, hash-verified

181
182 #[inline(always)]
183 fn write_32(&mut self, base: u64, offset: u64, bytes: [u8; 4]) -> core::result::Result<(), crate::Trap> {
184 let addr = checked_effective_addr::<4>(self.data.len(), base, offset)?;
185 self.data[addr..addr + 4].copy_from_slice(&bytes);
186 Ok(())
187 }
188
189 #[inline(always)]
190 fn write_64(&mut self, base: u64, offset: u64, bytes: [u8; 8]) -> core::result::Result<(), crate::Trap> {

Callers 1

storeMethod · 0.45

Calls 2

lenMethod · 0.45
copy_from_sliceMethod · 0.45

Tested by

no test coverage detected