#Announcing Nabi 0.1.0
#What Nabi is
Nabi is a statically typed, compiled language with closed sum types, no null, and errors written in function signatures. Programs are native executables (or WebAssembly modules) with a garbage-collected runtime. The design follows two rules from the specification: a narrow core with rich libraries, and clear rules that leave the user free inside them. The language decides types, dispatch, the memory model and evaluation order once; library design, domain modeling and code structure are left to you.
A first program:
nabi new hello
cd hello
nabi run
#What 0.1.0 includes
nabic, the compiler. It has its own code generator and its own linker: no LLVM, no system linker, no C compiler. A built-in C front end reads C headers fornabi bindgenand compiles C sources withnabi cc.nabi, the build and package tool:new,build,run,test,bench,fmt,lint,doc,add,publish,toolchainto install and switch versions, and more (nabi helplists them).nabils, the language server, a REPL (nabi repl) and a Jupyter kernel (nabi jupyter install).- The runtime, with a generational, moving garbage collector that works with threads, and async tasks.
- The standard library in three tiers,
bare,coreandstd: collections, text, numbers, time, files, processes, networking and TLS. Its API is on docs.nabi-lang.org. - The package registry, packages.nabi-lang.org, with 20 official packages:
autodiff,csv,http,interpolate,json,linalg,markdown,nabi-syntax,ode,optimize,plot,regex,signal,sparse,spatial,special,stats,table,tomlandunits. They come with the toolchain: code that uses one gets it added to its manifest on first use, with no network. - Editor support through
nabils: VS Code, Vim and Zed. - The playground, which compiles a program to WebAssembly and runs it in the browser.
- The docs: a guide, examples, the language and standard library specification, the standard library API and one page per error code, in English and Korean.
#Platforms
The toolchain runs on 8 hosts, one release archive each:
| Host | Triple |
|---|---|
| macOS, Apple silicon | aarch64-apple-darwin |
| Windows 11, x64 | x86_64-pc-windows-msvc |
| Windows 11, arm64 | aarch64-pc-windows-msvc |
| Linux x64, glibc 2.34+ | x86_64-unknown-linux-gnu |
| Linux arm64, glibc 2.34+ | aarch64-unknown-linux-gnu |
| Linux x64, static (musl) | x86_64-unknown-linux-musl |
| Linux arm64, static (musl) | aarch64-unknown-linux-musl |
| FreeBSD 14+, x64 | x86_64-unknown-freebsd |
It builds for 17 supported targets: the 8 hosts, plus i686-unknown-linux-gnu, i686-pc-windows-msvc, armv7-unknown-linux-gnueabihf, armv7-unknown-linux-musleabihf, wasm32-unknown-unknown (browser), wasm32-wasip2, wasm32-wasip1-threads, x86_64-linux-android (tested on the emulator) and aarch64-apple-ios-sim (the iOS simulator). A target is supported once its tests pass in a real environment for it. Every archive carries the runtime of every supported target, so nabi build --target <triple> cross-compiles from any host; Apple targets build only on macOS, Android ones need the NDK.
Six targets are in progress. The code is there, but they have only run under emulation, so --target refuses them and names what to use for now:
aarch64-linux-android(Android devices)aarch64-apple-ios(iOS devices)riscv64gc-unknown-linux-gnupowerpc64le-unknown-linux-gnus390x-unknown-linux-gnuriscv32imac-unknown-none-elf(embedded RISC-V)
The roadmap has them for the 0.2 series.
#Stability
Nabi is pre-1.0 and follows Cargo's reading of semver for 0.x: the minor number is the breaking slot. 0.2.0 may break code written for 0.1; 0.1.1, 0.1.2 and so on add features and fixes without breaking it. Expect breaking changes in each minor release until 1.0. Only the latest series gets fixes, security fixes included.
#Install
macOS, Linux and FreeBSD:
curl -fsSL https://nabi.sh | sh
Windows 11 (x64 or arm64), in PowerShell:
powershell -ExecutionPolicy Bypass -c "irm https://nabi.sh/install.ps1 | iex"
The script picks the archive for your machine, checks its SHA-256 and unpacks it into ~/.nabi (Windows: %USERPROFILE%\.nabi). The download page has the archives and the other options; Nix users can run nix profile install github:nabi-lang/nabi.
#Verify a download
Each release has a SHA256SUMS file, signed with minisign (SHA256SUMS.minisig), and a GitHub build provenance attestation for every archive. The release signing key:
untrusted comment: minisign public key B33E6FE61BE5314C
RWRMMeUb5m8+s0rEtzbR47dmyrMdlGyGQSvWUn/Ob5QYh0GHgs1GvJEs
minisign -Vm SHA256SUMS -P RWRMMeUb5m8+s0rEtzbR47dmyrMdlGyGQSvWUn/Ob5QYh0GHgs1GvJEs
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify nabi-0.1.0-x86_64-unknown-linux-gnu.tar.xz --repo nabi-lang/nabi
The download page has the steps for each system.
#Known limits
- The TLS stack and the cryptography in
core::cryptoare Nabi's own code, tested against NIST CAVP and Wycheproof vectors, and have had no independent audit. Treat them as experimental and do not rely on them to protect real secrets yet. - The binaries are not code-signed: no macOS notarization and no Windows Authenticode yet. Gatekeeper and SmartScreen warn about an archive downloaded with a browser; the
curl | shandirm | iexinstallers are not affected. The minisign signature and the attestations above are how to check a download for now. - Six targets are in progress (above).
- Only the registry's maintainers can publish packages for now. Anyone can sign in and use packages;
nabi loginsays so for an account that cannot publish yet. - Programs built for the
-gnuLinux targets need glibc 2.34 or newer. On an older system the installer picks the static musl archive. - The toolchain's build cache is capped at 5 GiB; set
NABI_CACHE_MAX_SIZE(2G,off) to change it, andnabi cache pruneornabi cache cleanto shrink it. - Nabi has no published performance comparison yet. Its code generator is young; measure your own workload.
#Get involved
- Questions, ideas and show-and-tell: GitHub Discussions.
- Bugs: issues on the repository they concern.
- Code and docs: read CONTRIBUTING.md. Commits carry a DCO sign-off (
git commit -s); there is no CLA. - Security issues: not in public. Use GitHub's private vulnerability reporting or write to [email protected] (SECURITY.md).
- Common questions: the FAQ.
#Thanks
Thanks to everyone who tried early builds, reported problems and read drafts of the docs, and to the projects Nabi learns from and builds on: the Rust toolchain it is written in, musl, wasi-libc, mingw-w64 and the others listed in THIRD-PARTY-NOTICES.