<p>with this PR <a href="https://github.com/go-interpreter/wagon/pull/58">https://github.com/go-interpreter/wagon/pull/58</a> merged into <code>wagon</code>, there's support for wasm modules containing native Go functions.
Thanks Guillaume!</p>
<p>This opens the path for having a pure-Go (sans nodejs) support for wasm modules created by (to be) Go-1.11 (that currently relies on some nodejs functions for interacting with the system).</p>
<ul>
<li><a href="https://github.com/go-interpreter/wagon/blob/master/exec/call_test.go#L15">https://github.com/go-interpreter/wagon/blob/master/exec/call_test.go#L15</a></li>
<li><a href="https://github.com/go-interpreter/wagon/blob/master/exec/call_test.go#L139">https://github.com/go-interpreter/wagon/blob/master/exec/call_test.go#L139</a></li>
</ul>
<hr/>**评论:**<br/><br/>shadowh511: <pre><p>I've been trying to use this for a while and I've been completely unlucky getting a function that has arguments to work. Has anyone here gotten functions with arguments to work?</p></pre>sbinet: <pre><p>The second link shows a test that calls a host function with an argument (add3).</p>
<p>What did you do?
And what was the (unexpected) result?</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传