3 ms·
LLGo: Go compiler based on LLVM that integrate Go with the C ecosystem
- xushiwei 1mo agoLLGo v1.0 is compatible with Go 1.20+ source code and supports the complete Go 1.26 language syntax, as well as cgo. Compatibility is checked against applicable upstream GOROOT/test cases using pinned Go 1.25 and Go 1.26 toolchains. LLGo is a Go compiler based on LLVM in order to better integrate Go with the C ecosystem, including Python and JavaScript. It's a subproject of the XGo project. LLGo aims to expand the boundaries of Go/XGo, providing limitless possibilities such as: * Game development * AI and data science * WebAssembly * Embedded development * ... How can these be achieved? LLGo := Go * C ecosystem LLGo is compatible with the C ecosystem through the C Application Binary Interface (ABI), while LLGo is compatible with Go at the source-code level. The C ecosystem includes languages that expose C-compatible interfaces (e.g. C/C++, Python, JavaScript, Objective-C, and Swift).
- pancsta 1mo agoHow’s the size of WASM binaries in llgo? Because TinyGo is pure pain when you rely on stdlib. Also networking in WASI would be great. I will give it a spin, but leaving questions open here (no info on github).
- xushiwei 1mo agoGood question. v1.0.0/v1.0.1 focused on being a drop-in Go replacement (full Go 1.20+ source compat, complete Go 1.27 syntax, cgo support), not WASM/WASI specifically. WASI networking should work, and stdlib should be fully supported since that's our compat target. Binary size vs. stdlib coverage is likely a tradeoff, similar to TinyGo — haven't benchmarked it rigorously yet though. Next release (~1–1.5 weeks) will bring full wasm/wasi support with a test report, including size numbers. Will post back here once it's out.
- pancsta 1mo ago> WASI networking should work, and stdlib should be fully supported since that's our compat target. Back in the day https://github.com/dispatchrun/net https://github.com/dispatchrun/net used to work for socket extensions in Big Go (but not TinyGo). > v1.0.0/v1.0.1 focused on being a drop-in Go replacement (full Go 1.20+ source compat, complete Go 1.27 syntax, cgo support), not WASM/WASI specifically. I will be honest that I'm more rooting for TamaGo getting WASM support (as it's a fork of gc), but llgo seems like a great middle ground. Also the lang interops may be useful to some when migrating codebases.
- xushiwei 1mo ago[flagged]