[wasm] go-interpreter/wagon & wasm-modules with native (Go) functions

agolangf · · 646 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<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&#39;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&#39;ve been trying to use this for a while and I&#39;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

646 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传