Modern Pipeline
Go frontend featuring lexer, parser, type checker, and SSA MIR builder. Inspect every stage or emit MIR for custom tooling.
A statically typed playground for compiler nerds. Build SSA pipelines, target multiple backends (C, VM, Cranelift), and experiment with a batteries-included standard library—all written in Go.
Go frontend featuring lexer, parser, type checker, and SSA MIR builder. Inspect every stage or emit MIR for custom tooling.
Switch between the C backend, VM interpreter, or experimental Cranelift bridge. Pick the right trade-off for speed vs. iteration time.
Batteries-included modules: `std.io`, `std.string`, `std.math`, collections, OS helpers, networking, testing, and dev utilities.
VS Code extension, CLI tooling (`omnic`, `omnir`, `omnipkg`), and automated packaging via GitLab CI make hacking pleasant.
git clone https://github.com/omni-lang/omni.git
cd omni
make build # build compiler + tools
make test # run language + stdlib tests
import std
func main():int {
std.io.println("Hello, OmniLang!")
return 0
}
# Native executable (C backend)
./bin/omnic hello.omni -o hello
./hello
# Fast VM execution
./bin/omnir hello.omni
# Inspect MIR
./bin/omnic hello.omni -emit mir
Like Python’s “Beginner’s Guide”, these snippets show what real OmniLang code looks like: interactive I/O, structured data, asynchronous tasks, and testing helpers bundled with the toolchain.
import std
func main():int {
std.io.print("Name: ")
let name = std.io.read_line()
std.io.println("hey " + name + " 👋")
return 0
}
struct Todo { id:int text:string done:bool }
func main():int {
var todos:array = []
todos.push(Todo{id:1, text:"learn SSA", done:false})
for t in todos {
if !t.done {
std.io.println("TODO #" + t.id.to_string() + ": " + t.text)
}
}
return 0
}
import std.net
func fetch(url:string):string {
let res = std.net.http.get(url)
return res.body
}
func main():int {
let docs = fetch("https://example.com/docs")
std.io.println("downloaded " + docs.len().to_string() + " bytes")
return 0
}
import std.testing as t
func add(a:int, b:int):int { return a + b }
test "adds numbers" {
t.assert_equal(add(2, 2), 4)
}
Primitives (`int`, `float`, `bool`, `string`, `char`), arrays, maps, user-defined `struct`/`enum`, and type inference with `let` defaults.
`if`, `switch`, `for` (classic + range), `defer`, early `return`, logical ops, and SSA-friendly constructs.
First-class functions, multiple return values, and explicit mutability via `var`.
`omnir` drives end-to-end suites in `omni/tests/e2e` plus a dedicated `std.testing` module for assertions and fixtures.
Located in vscode/omni: syntax highlighting, snippets,
simple completions, and inline diagnostics powered by `omnic`.
`omnic` (compiler), `omnir` (runner/test harness), and `omnipkg` (packager) cover the full workflow from prototype to release.
Dive deeper via the in-repo
README and the reference material under
docs/.
Explore standard library modules in omni/std/ and
examples/tests in omni/tests/.
OmniLang’s active development happens on a private GitLab instance and is mirrored to GitHub for easy browsing. Contributions, experiments, and wild ideas are welcome—this is a playground for compiler explorers.