diff options
author | Daniel Wirtz <dcode@dcode.io> | 2019-12-03 22:27:59 +0100 |
---|---|---|
committer | Alon Zakai <azakai@google.com> | 2019-12-03 13:27:59 -0800 |
commit | b7f75aba59123eca79774d096524079f635cadbd (patch) | |
tree | 56af5385993cda7aa9e59b33d82b40be55221f56 /src/wasm-binary.h | |
parent | 31eac76abfc24afe2217fae0f20ebee2a5871e5c (diff) | |
download | binaryen-b7f75aba59123eca79774d096524079f635cadbd.tar.gz binaryen-b7f75aba59123eca79774d096524079f635cadbd.tar.bz2 binaryen-b7f75aba59123eca79774d096524079f635cadbd.zip |
Add Emscripten memory helpers for using the C-API (from Wasm) (#2476)
We already have exports for _malloc and _free in the Emscripten build, but there
is no way yet to initialize the data without resorting to JS. Hence this PR
adds a few additional memory helpers to the Emscripten build so it becomes
possible to manipulate Binaryen memory without the need for extra glue code, for
example when Binaryen is a WebAssembly import, and one is allocating strings to
be used by / reading strings returned by Binaryen.
I expect this to be a bit controversial because the use case is relatively
specific, but it makes sense for us because we are consuming the C-API directly
(from JS and eventually Wasm) and don't rely on binaryen.js-post.js.
Diffstat (limited to 'src/wasm-binary.h')
0 files changed, 0 insertions, 0 deletions