Cargo.toml
to add the Wasmer dependencies as shown below:mem
;load
.WasmPtr
as its first return value. This WasmPtr
is what will give us the ability to interact with the memory.hello
exported function: it will return what we'll call a pointer.load
function gave us its length. We have everything we need!Cell
s: we want this slice to be the size of the new string starting at the same offset as our pointer. This allows us to completely overwrite the old string with the new one.ruby instance.rb
command.