Mini-Go is an embeddable scripting engine with Go-like syntax. Go applications compile and run
scripts directly, Rust applications execute the same bytecode, and the TypeScript runtime supports
browsers and Node.js. The mini-go CLI runs .mgo files without a host application.
- Go-like language with generics, closures, channels, reflection, and embedded resources.
- Isolated instances with cancellation, resource limits, observability, and hot patching.
- Host capabilities and generated Go, Mini-Go, Rust, and TypeScript MRPC bindings.
- Go, Rust, and TypeScript runtimes backed by the same bytecode contract.
- Formatting, LSP, DAP, caching, and a VS Code extension.
The standard library surface implemented by Mini-Go is listed in the generated reference.
The Go host toolchain requires Go 1.26 or later:
go install github.com/d7z-team/mini-go/cmd/mini-go@latestCreate hello.mgo:
package main
func main() {
println("Hello, Mini-Go!")
}Check and run it:
mini-go check hello.mgo
mini-go run hello.mgoMini-Go source files use .mgo; tests use _test.mgo. See the Go and CLI guide for
project layout, host capabilities, execution control, and hot patching.
An embedding application loads a reusable Program and creates an isolated instance for each runtime
state. Go applications can compile sources directly; Rust and TypeScript provide their own runtime
and source-tool APIs.
| Environment | Install | Start here |
|---|---|---|
| Go | go get github.com/d7z-team/mini-go |
Complete Go example |
| Native Rust | mini-go crate |
Rust runtime |
| Browser and Node.js | npm install @d7z-team/mini-go |
TypeScript runtime |
The detailed guides below are written in Chinese.
| Task | Guide |
|---|---|
| Embed in Go or use the CLI | Go and CLI guide |
| Define and connect RPC services | RPC guide |
| Configure the editor | VS Code extension |
| Understand component boundaries | Architecture |
| Build, test, diagnose, or release | Development guide |
Maintainer workflows are in the development guide.
Mini-Go uses the MIT License. Ported Go standard-library sources retain their original copyright notices and use the Go license.