Open-source project
goplus/ixgo avatar
goplus/ixgo

iXGo: A Go Interpreter That Runs Generics and XGo Scripts

The Go/XGo Interpreter

147 stars24 forksGoApache-2.0

At a glance

What is it?
iXGo is a Go interpreter from the goplus project that supports generics, generic methods, and the XGo scripting syntax. It runs on multiple architectures and can execute Go code embedded in Go programs, but it has clear limitations in testing and performance.
Who is it for?
Adopt iXGo if you need to embed a Go interpreter in a Go application, run Go scripts with generics, or experiment with the XGo scripting syntax. Avoid it if you require fuzzing or coverage in your test workflow, or if you depend on the latest Go features beyond version 1.27.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • goplus/ixgo147 ★ · +5
Star history
Repository2026-08-212026-11-15
goplus/ixgo142147

5 Stars in the last 86 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What iXGo Solves and Who It Is For

iXGo is a Go interpreter that aims to support all Go language features, including generics and generic methods. This is a specific niche: most Go interpreters lag behind the compiler, especially on generics. The project targets developers who want to run Go code dynamically, such as in a REPL, a plugin system, or a scripting environment, without recompiling. It also supports XGo, a scripting syntax that simplifies Go for quick scripts. The intended users are Go developers who need an embedded interpreter or a tool for interactive exploration. The README positions it as 'a fast Go interpreter', but no benchmarks are provided to substantiate that claim.

The Architecture: ABI Support and Compiler Compatibility

The interpreter works by executing Go code directly, rather than compiling to native binaries. It supports two Go ABIs: ABI0, the older stack-based ABI, and ABIInternal, the register-based calling convention. The latter is supported on amd64, arm64, ppc64/ppc64le, riscv64, and loong64. This is a significant design choice because it means iXGo must mimic the Go runtime's calling conventions exactly to work correctly. The README also lists compatibility with both the standard Go compiler (gc) and LLGo, a LLVM-based Go compiler. This suggests the interpreter can handle code compiled by either toolchain, though the details of that integration are not explained in the README.

Getting Started: Installation and Commands

Installation is straightforward with Go's standard tool: `go install github.com/goplus/ixgo/cmd/ixgo@latest`. There is also a separate command, `qexp`, for exporting Go packages to iXGo's builtin package format. The main `ixgo` command offers several subcommands: `repl`, `run`, `build`, `test`, `version`, and `export`. To run a package, you use `ixgo run [build flags] [package] [arguments...]`. The run command accepts flags like `-ssa` to print SSA instructions, `-ssa-trace` to trace the SSA interpreter, and `-mod` to control module download mode. The REPL mode can be started with `ixgo` or `ixgo repl`, and you can disable XGo syntax with `ixgo repl -go`. For embedded use, the README shows a Go program that calls `ixgo.RunFile` with a source string, which is a clear example of how to integrate the interpreter into your own application.

The XGo Syntax and Its Playgrounds

XGo is a scripting syntax that sits on top of Go, designed to be more concise. The README gives an example: instead of defining a package and importing fmt, you write `languages := ["C", "Go", "Python", "JavaScript"]` and then `echo "XGo :=", languages.join(" * "), "+ Scratch"`. This is a significant departure from standard Go, which would require a full package structure. The XGo syntax is not just a REPL convenience; it can be run as a source file via `ixgo.RunFile` with a `.xgo` extension. The project also hosts two WebAssembly playgrounds, one for XGo and one for the REPL, at play.xgo.dev and repl.xgo.dev. These are hosted versions, but the source is available in separate repositories. If you are interested in scripting with a lighter syntax, XGo is the unique selling point here.

Limitations: What iXGo Cannot Do

The most obvious limitation is in the `test` subcommand: `test -fuzz` and `test -cover` are not supported. This means you cannot use iXGo for fuzzing or coverage analysis, which are essential for serious testing. The documentation does not mention other test features, so it is unclear if `test -race` or `test -bench` work. Another limitation is the Go version range: it supports Go 1.25 to 1.27. If you are on Go 1.28 or later, you may be out of luck. The README also notes that for faster performance with `iter.Pull` and `iter.Pull2`, you need to build with a special tag: `go install -tags linknamefix -ldflags="-checklinkname=0"`. This suggests that without that tag, performance on iterator functions is degraded. The documentation does not explain what other performance trade-offs exist, so you should test your specific workload.

A Real Alternative: The Standard Go Compiler

The obvious alternative is the standard Go compiler, `go run` and `go build`. The difference in approach is fundamental: the compiler produces native binaries, while iXGo interprets the source at runtime. The compiler is faster for execution and has full support for all testing features, including fuzzing and coverage. However, it lacks the ability to embed a scriptable interpreter in an application or to run Go code dynamically without a build step. Another alternative is `yaegi`, a Go interpreter that is also embeddable, but the README does not mention it, so I cannot compare them directly. For most production applications, the compiler is the right choice because of performance and tooling. iXGo is only worth considering when you need dynamic code execution.

Maintenance and Licensing

The project is licensed under Apache-2.0, which is permissive and allows commercial use, modification, and redistribution, provided you include the license and notice. The repository is not archived, and the last push was on 2026-08-25, with recent releases v1.1.6, v1.1.5, and v1.1.4 in the same month. This indicates active maintenance, at least in the short term. The release cadence is roughly weekly, which is a good sign for bug fixes. However, the project is tied to the Go version range, so you will need to upgrade iXGo as Go evolves. The upgrade cost is low because it is a single binary, but you must track new releases to stay compatible with your Go toolchain. The documentation does not provide a migration guide, so plan for manual testing after upgrades.

Editorial conclusion

Adopt iXGo if you need to embed a Go interpreter in a Go application, run Go scripts with generics, or experiment with the XGo scripting syntax. Avoid it if you require fuzzing or coverage in your test workflow, or if you depend on the latest Go features beyond version 1.27. Before committing, verify that your target platform (especially WebAssembly) supports the ABI you need, and test your specific generics usage against the interpreter's behavior, as the documentation does not detail edge cases.

Frequently asked questions

What is the ixgo interpreter and what does it support?

A fast interpreter for Go and XGo that supports all Go language features, including type parameters, generic type aliases and generic methods. It runs on macOS, Linux, Windows and WebAssembly, against the standard Go compiler or LLGo.

How do I install the ixgo command?

Run go install github.com/goplus/ixgo/cmd/ixgo@latest for the interpreter itself. A second command, the export tool, is installed separately with go install github.com/goplus/ixgo/cmd/qexp@latest, and is used to export a Go package into the interpreter's builtin package.

Which Go versions and architectures does ixgo support?

Go 1.25 through 1.27. For the register-based internal ABI it covers amd64, arm64, ppc64 and ppc64le, riscv64 and loong64, in addition to the stack-based ABI.

What happens if I enable the goplus.ifacefuncval build tag on a stock Go compiler?

The build succeeds and interface method calls then trap. The tag is only meaningful with a patched toolchain, where a patched compiler with the tag disabled matches the official compiler exactly. Rebuild the standard library with the patch tool first.

Does ixgo support fuzzing or code coverage?

No. Fuzzing and coverage are the two features listed as unsupported in the test command. Ordinary package tests do run, and the repository includes dedicated tests for direct calls, race conditions, tuples and typed callbacks.

Can I run ixgo in a browser?

WebAssembly is a listed platform. There is a playground and a separate REPL playground, both running as WebAssembly builds, and the optional interface-call build tag supports the wasm architecture among others.

Official sources

  1. Official README
  2. Project repository
  3. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/goplus-ixgo.svg)](https://hysenlabs.com/projects/goplus-ixgo)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/goplus-ixgo.svg)](https://hysenlabs.com/projects/goplus-ixgo)

Was this useful?