TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

WASI Support in Go

167 点作者 spacey超过 1 年前

5 条评论

dilyevsky超过 1 年前
I wish they added some way of exporting wasm funcs as well so that they could be called from host. Tinygo wasm target supports both "exports" and "imports". The other thing that is worse compared to tinygo is the generated binary size seems to be about 10x larger. From my brief look at the transpiled .wat printout a lot of included funcs aren't being called anywhere...
评论 #37501532 未加载
评论 #37501273 未加载
评论 #37500663 未加载
评论 #37501175 未加载
umvi超过 1 年前
I feel like we need better WASM performance in go before we get WASI. In my experience go wasm performance is pretty bad, usually significantly worse than vanilla JS.<p>Rust (or really anything LLVM backed) is still probably the best WASM language in terms of performance and support, but .NET (don&#x27;t forget to turn on AOT) is starting to get really good too (except for the fact that .NET compiler barfs out a bazillion files that the browser needs vs. 1 self contained .js or .wasm file which sucks if you are trying to build a self contained library like OpenCV.js)
评论 #37501552 未加载
评论 #37500957 未加载
评论 #37506111 未加载
candiddevmike超过 1 年前
I still don&#x27;t understand the benefit of running a Go app on a cloud provider using this. Anyone want to help me?<p>Is it an edge play for using something like Cloudflare Workers?<p>Is it cheaper vs standard serverless&#x2F;container deployments? Go apps can already scale to 0 for these use cases.
评论 #37501127 未加载
评论 #37501222 未加载
评论 #37501062 未加载
kungfufrog超过 1 年前
Can someone hit me with the value proposition of all this WASI stuff and WASM and ELI5? (I get the browser use-case)<p>My understanding is as follows:<p><pre><code> WASM - a portable, platform-independent virtual machine for executing a &quot;web assembly&quot; WASI - an extension to the virtual machine that adds APIs for interacting with the system and breaks all the WASM sandboxing (presumably NOT platform-independent?) </code></pre> Is the point of this addition to Go that I can now target &quot;WASM implementations that have WASI&quot; with Go source code compiled to WASM?<p>Why would someone want to do that? Just for edge functions in cloud workers?
评论 #37503687 未加载
评论 #37506408 未加载
评论 #37503004 未加载
评论 #37502837 未加载
评论 #37502821 未加载
ramesh31超过 1 年前
Badass. The `GOOS=js` build had so many workarounds needed that it was barely worth it to port existing code, and wasm_exec.js always felt like a terrible hack. I&#x27;ll be updating all of my stuff with this and pulling out the shims.