TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

We Compiled a Golang Database in the Browser Using WebAssembly

11 pointsby jinqueenyover 5 years ago

1 comment

jinqueenyover 5 years ago
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.