The library produced by wasm-ffi is exported, and the functions are all bound to their own names. addTwo is all of the different addTwos tied together, if the name addTwo was taken this wouldn't happen. It is also added to the library. I thought about the interface for dealing with the modules and this seems to be a good way. Used like so:
JLAdd could be any string, and then functions can be exported by name.
I think it would be safe to make wtype return i32 for anything else as it's probably a pointer if it's not one of those basic types, but it's not necessary yet.
Add support for producing a js library out of a module.
Example output:
The library produced by
wasm-ffi
is exported, and the functions are all bound to their own names.addTwo
is all of the differentaddTwo
s tied together, if the nameaddTwo
was taken this wouldn't happen. It is also added to the library. I thought about the interface for dealing with the modules and this seems to be a good way. Used like so:JLAdd
could be any string, and then functions can be exported by name.I think it would be safe to make
wtype
returni32
for anything else as it's probably a pointer if it's not one of those basic types, but it's not necessary yet.