A fast Go interpreter that supports all Go language features, including generics and generic methods.
- Go 1.25 ~ 1.27
- Go (gc)
- LLGo
- macOS
- Linux
- Windows
- WebAssembly
-
ABI0 stack-based ABI
-
ABIInternal register-based Go calling convention proposal
- amd64 arm64 ppc64/ppc64le riscv64 loong64
- Supports type parameters (generics)
- Supports generic type aliases
- Supports generic methods (Go 1.27)
go install github.com/goplus/ixgo/cmd/ixgo@latestgo install github.com/goplus/ixgo/cmd/qexp@latestixgo # ixgo repl mode
ixgo run # run a Go/XGo package
ixgo build # compile a Go/XGo package
ixgo test # test a package
ixgo version # print version
ixgo export # export Go package to ixgo builtin package
Usage: ixgo run [build flags] [package] [arguments...]
-exp-gc
experimental support runtime.GC
-mod value
module download mode to use: readonly, vendor, or mod.
-ssa
print SSA instruction code
-ssa-trace
trace SSA interpreter code
-tags value
a comma-separated list of build tags to consider satisfied during the build
-v print the names of packages as they are compiled.
-x print the commands.
ixgo # run repl mode, support Go/XGo
ixgo repl # run repl mode, support Go/XGo
ixgo repl -go # run repl mode, disable XGo syntax- test -fuzz
- test -cover
- https://play.xgo.dev/
- https://github.com/goplusjs/play
- https://repl.xgo.dev/
- https://github.com/goplusjs/repl
package main
import (
"github.com/goplus/ixgo"
_ "github.com/goplus/ixgo/pkg/fmt"
)
var source = `
package main
import "fmt"
func main() {
fmt.Println("Hello, World")
}
`
func main() {
_, err := ixgo.RunFile("main.go", source, nil, 0)
if err != nil {
panic(err)
}
}package main
import (
"github.com/goplus/ixgo"
_ "github.com/goplus/ixgo/xgobuild"
)
var source = `
languages := [
"C",
"Go",
"Python",
"JavaScript",
]
echo "XGo :=", languages.join(" * "), "+ Scratch"
`
func main() {
_, err := ixgo.RunFile("main.xgo", source, nil, 0)
if err != nil {
panic(err)
}
}go install -tags linknamefix -ldflags="-checklinkname=0" github.com/goplus/ixgo/cmd/ixgo@latestuse runtime linkname for faster performance iter.Pull/iter.Pull2
https://github.com/visualfc/ixgo_demo