go-embedded-julia documentation
go-embedded-julia is in development. v0.3.0
(2026-10-28) completes milestone M0 (the oracle harness, against julia 1.12.6),
milestone M1 (the parser): a Go port of JuliaSyntax, Expr-identical to
Meta.parseall on 1191 of 1191 files of julia’s own tree, and milestone M2
(lowering): a Go port of julia 1.12.6’s femtolisp front end, identical to
Meta.lower on 53 997 of 53 997 forms of that tree. Milestone M3 (the Core
runtime) is in progress: v0.9.0
(2026-10-31) extends the package interp, a port of julia 1.12.6’s
src/interpreter.c that runs lowered code over Core (added in v0.6.0), on top of
Julia’s type objects, subtyping, method specificity and the dispatch of concrete
calls (v0.5.0). struct and abstract type definitions run (v0.7.0), with julia’s
default constructors (jl_ctor_def) and user-defined outer constructors;
calling a type dispatches on its constructors. Methods with where clauses now
dispatch with static parameters (for example f(x::T) where {T<:Integer} = T),
through the TypeVar and UnionAll constructors of boot.jl (lines 335-338),
built in Go until boot.jl runs. Structs and abstract types with parameters
(struct Q{T}, abstract type A{T}) run too (v0.9.0): Q(1) infers
Q{Int64}, Q{Integer}(1) runs the inner constructor, and a parameter no field
constrains gets no outer constructor, as jl_ctor_def decides; constructor
signatures keep the called type first, as in julia’s one method table, and a type
argument dispatches as Type{X}. interp.New().NewSession().Eval(src)
parses, lowers and runs a cell; interp.Repr shows the value as julia does. Core
has the built-in types, the exception and AST types of boot.jl and
jltypes.c, 24 builtins and the integer and float intrinsics. 85 Core-only
programs show the same value in Go and in julia 1.12.6; statement coverage is
100% and FuzzEval fuzzes it. Not yet: Base (+, println, a.b, and a
constructor call whose argument needs convert), macro expansion, redefining a
struct that has parameters (it needs Base.getproperty), const and atomic fields, arrays and finally; the
speed against julia’s interpreter is not measured yet. The interpreter is
therefore not finished: apart from the parser, the lowering, the core and
core/dispatch packages and this part of interp, these pages describe a plan. Every statement comes from the
bibliography of the go-scikit roadmap,
bib/julia.md.
What it will be
A Julia interpreter written in pure Go, which can be embedded:
- Julia’s parser and lowering ported to Go. JuliaSyntax is Julia’s parser;
julia 1.12.6 lowers with its femtolisp front end (
julia-syntax.scm), which is what thelowerpackage ports. A Go VM has no femtolisp, so both have to be native before any Julia can run. - An interpreter over the lowered IR, which runs Julia’s own Base unchanged. Base is evaluated at build time and the resulting heap is shipped as an image.
- The runtime boundary mapped onto fleet libraries. Intrinsics and
ccalltargets are implemented in Go, with go-bignum, go-ndarray, go-fft and the regexp stack standing where Julia calls GMP and MPFR, BLAS and LAPACK, FFTW and PCRE2. See Runtime boundary.
What it is for
The julia cells of go-notebook and of its
WebAssembly playground. It mirrors
go-embedded-ruby, whose rbgo is the Ruby
VM behind go-notebook’s ruby cells.
Honest scope
It is an interpreter. It keeps Julia’s semantics, not its native speed; heavy
computation goes through the Go libraries. An interpreter cannot match Julia’s JIT
on loops. The comparisons that can hold are start-up and first result, and the
kernels routed to go-ndarray and go-bignum. The plan marks every interpreter speed
statement as unverified, except the parser’s (0.98 s against 1.39 s for
Meta.parseall on one core, over julia 1.12.6’s share/julia tree); the ratio
of each later milestone will be stated once it is measured.
Pages
| Page | What it holds |
|---|---|
| Plan | milestones M0 to M7 with their size and exit test, what the playground shows at each, and how conformance is measured |
| Architecture | the pipeline, the parser (with its usage), the lowering, the runtime in Go, type inference, the Base bootstrap and the image |
| Runtime boundary | the counts: intrinsics, builtins, ccall sites by target, regex, FFT |
| Licences | what may be translated, what is run or replaced, and the GPL parts avoided |
Repositories
| Repo | What it is |
|---|---|
| julia | the interpreter (source) |
| docs | this site |
| go-embedded-julia.github.io | the landing page |
| brand | the logo, icons and social images |
The interpreter itself is in go-embedded-julia/julia.
Created on by tannevaled
Modified on by tannevaled