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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

We Compiled a Golang Database in the Browser Using WebAssembly

11 点作者 jinqueeny超过 5 年前

1 comment

jinqueeny超过 5 年前
Want to make your own Golang apps run in a browser? Here’s what we learned ...<p>We had a lot of fun—and learned a lot—from our little adventure at TiDB Hackathon 2019. If you want to make your own Golang applications run in a browser, here are some suggestions:<p>As [WebAssembly Weekly - Issue #100](<a href="https:&#x2F;&#x2F;wasmweekly.news&#x2F;issue-100&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wasmweekly.news&#x2F;issue-100&#x2F;</a>) mentioned, &quot;WebAssembly support for Go applications is very much in its infancy.” For example, Golang hasn&#x27;t fully supported WASI, and goleveldb doesn’t support Wasm&#x2F;js. Be discreet before you go too deep, and clearly understand the use cases for your application.<p>Make sure your application doesn&#x27;t have third-party platform-specific dependencies that can’t be compiled to Wasm.<p>Browsers don’t allow port listening and file operations, so you’ll have to work around those limitations.