Re: Can I generate the external function declaration in the specific module?

2019-02-14 Thread Duan Bing
Thanks. I have done the process that by manual, worked but not concise, this is why I posted this thread. On the other hand, I don't find any spec about if we can or can't generate the user-defined module. I hope we can have a better approach to do it. 在 2019年2月15日星期五 UTC+8上午3:09:10,Alon

Re: Can I generate the external function declaration in the specific module?

2019-02-14 Thread Alon Zakai
There isn't a good way to do that right now, but you can use wabt or binaryen to emit wasm text, edit that, and convert back to wasm. (It's almost possible to do this in binaryen.js - we have the tools to get the function's module, but not set it, yet.) On Tue, Feb 12, 2019 at 11:09 PM Duan Bing

Can I generate the external function declaration in the specific module?

2019-02-12 Thread Duan Bing
I write a C source file, declare an external function by extern "C" int say_hello(const char*, int); So after compiling by `emcc`, I got (import "env" "_say_hello" (func (;30;) (type 1))) in the math.wast. Everything is ok for now. but I want to change the module of _say_hello to another