binaryen.js
binaryen.js copied to clipboard
Please add a little bit more examples to the README
I currently have a problem with what the 'ptr' param is in store function. It would be really nice if you add some other examples to the code showing just how one or two times how an api is used for similar functions. Otherwise it is really hard for users to understand all of them
The ptr parameter is the pointer (i.e. location in memory) that you're storing the value to. If you wanted to store 123 as a 32-bit integer to the location 456, you'd use module.i32.store(0, 0, module.i32.const(456), module.i32.const(123)).
Thanks a lot, I actually remembered that I have dealt with this function before