- Go1.18 ~ Go1.24
- macOS Linux Windows WebAssembly GopherJS and more.
support ABI0 and ABIInternal
-
ABI0 stack-based ABI
-
ABIInternal register-based Go calling convention proposal
- Go1.17: amd64
- Go1.18: amd64 arm64 ppc64/ppc64le
- Go1.19: amd64 arm64 ppc64/ppc64le riscv64
- Go1.20: amd64 arm64 ppc64/ppc64le riscv64
- Go1.21: amd64 arm64 ppc64/ppc64le riscv64
- Go1.22: amd64 arm64 ppc64/ppc64le riscv64 loong64
- Go1.23: amd64 arm64 ppc64/ppc64le riscv64 loong64
- Go1.24: amd64 arm64 ppc64/ppc64le riscv64 loong64
- support typeparams (Go1.18 ~ Go1.24)
- support alias typeparams (Go1.24)
ixgo.Mode ExperimentalSupportGC
experimental support runtime.GC and runtime.SetFinalizer
Go version <= 1.22:
go install github.com/goplus/ixgo/cmd/ixgo@latest
Go version >= 1.23
go install -ldflags="-checklinkname=0" github.com/goplus/ixgo/[email protected]
go install github.com/goplus/ixgo/cmd/qexp@latest
ixgo # ixgo repl mode
ixgo run # run a Go/XGo package
ixgo build # compile a Go/XGo package
ixgo test # test a package
ixgo verson # 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://github.com/goplus/ispx
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/gopbuild"
)
var source = `
fields := [
"engineering",
"STEM education",
"and data science",
]
echo "The XGo language for", fields.join(", ")
`
func main() {
_, err := ixgo.RunFile("main.xgo", source, nil, 0)
if err != nil {
panic(err)
}
}