implement the value opcode

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2024-04-17 18:05:51 +02:00
parent 09b905415b
commit b208daed7e
8 changed files with 78 additions and 4 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ fn link_host_functions(engine: &Engine) -> Linker<State> {
|caller: Caller<State>, out_ptr: u32, out_len_ptr: u32| -> Result<(), Trap> {
let (mut caller, state) = caller.split();
let value = state.value.encode();
let value = state.value.to_le_bytes();
caller.write_memory(out_ptr, &value)?;
caller.write_memory(out_len_ptr, &(value.len() as u32).encode())?;