A native interpreter for the Ballerina programming language.
Website · Playground · Language spec · Developing · Architecture · Roadmap
Ballerina is an open-source, cloud-native programming language optimized for integration, with built-in support for JSON and XML, first-class constructs for services and concurrency, and structural typing. It is developed and supported by WSO2 and the wider Ballerina community. Try the language in your browser on the Ballerina Playground.
Ballerina Nutcracker compiles Ballerina source to Ballerina Intermediate Representation (BIR) and interprets the BIR directly. Written in Go, it ships as one bal binary — no separate runtime, nothing to warm up — which keeps startup fast and the footprint small for short-lived cloud-native workloads such as CLIs, functions, and sidecars.
Important
Nutcracker is under active development and does not yet support the whole language. For production use today, reach for Ballerina Swan Lake — the official distribution, which supports the full language.
Almost everything that ships in the bal binary is a Go package. The central cache, the local repository, the host OS, and the browser sit outside it. See ARCHITECTURE.md for how the diagram maps onto source directories.
Download a binary from the latest release, or build from source with Go 1.27 or later:
git clone https://github.com/ballerina-nutcracker/ballerina.git
cd ballerina
go build -o bal ./cli/cmdCreate and run your first program:
./bal new hello
./bal run helloimport ballerina/io;
public function main() {
io:println("Hello, World!");
}| Command | Description |
|---|---|
bal new <path> |
Create a new package (-t <template>, --workspace) |
bal run <file.bal> | <package-dir> | . |
Compile and execute a source file or package |
bal pack [<package-dir>] |
Build the .bala distribution archive of a package |
bal build [<package-dir>] |
Build a standalone executable that bundles the Ballerina runtime |
bal push [<bala-path>] --repository=local |
Push a .bala of the current package (or a given archive) to the local repository |
bal version |
Print the version |
bal build needs a balrt stripped-down runtime alongside bal (go build -o balrt ./cli/internal/balrt), or pointed at via the main.RuntimeStubPath link-time override.
For debugging flags, profiling, testing, and linting, see DEVELOPING.md.
Development is organized by subsets of the Ballerina language; each milestone adds support for a defined subset.
- Progress: GitHub Milestones
- Supported language features:
doc/lang - Supported library features:
doc/library
Contributions are welcome — read the contribution guidelines to get started, and the code of conduct before you take part.
- Found a bug or want a feature? Search existing issues, then open a new one.
- New here? Start with issues labelled
good first issue. - Found a security vulnerability? Do not open an issue. Email security@ballerina.io — see the security policy.
Questions and ideas belong in GitHub Discussions or on Discord — Discord is where the team is most active. See ballerina.io/community for everything else.
Distributed under the Apache License 2.0.
