🌐 English · Japanese
Align is an AOT-compiled, data-oriented programming language designed for the human who writes the code, the AI that generates it, the compiler that optimizes it, and the hardware that runs it. Errors, ownership transfers, allocation, and parallel work are explicit in the source. Array and slice pipelines let you express data transformations that the compiler can fuse into loops, while columnar layouts keep frequently used fields together in memory.
Currently supported platforms:
- Linux x86-64 and ARM64
- macOS Apple Silicon (aarch64)
- Windows is not supported.
brew tap sanohiro/align
brew install aligncurl -fsSL https://sanohiro.github.io/align/install.sh | sudo sh
sudo apt install aligncThe install script configures the LLVM 22 and Align apt repositories, then apt install alignc pulls the compiler and its runtime.
Building the compiler needs Rust 1.96+ and LLVM 22 (with a matching clang as the C compiler/linker).
Install the LLVM toolchain from the official apt.llvm.org repository; llvm-config-22 must be on your PATH:
sudo apt install llvm-22 llvm-22-dev clang-22Install the dependencies with Homebrew:
brew install llvm openssl@3 zstdThe llvm formula currently provides LLVM 22; if Homebrew has since moved it past 22, install the versioned llvm@22 formula instead. Homebrew's LLVM is keg-only (its llvm-config is not on your PATH), so point the build at it and add the linker search paths for the runtime's native libraries (zstd, openssl@3). Add these to your shell profile, or prefix each cargo / alignc command with them (the same LIBRARY_PATH is needed when running an alignc-built program that links those libraries):
export LLVM_SYS_221_PREFIX="$(brew --prefix llvm)"
export LIBRARY_PATH="$(brew --prefix)/lib:$(brew --prefix openssl@3)/lib"cargo build --release
# The compiler binary will be at target/release/aligncCreate a file named hello.align:
fn main() -> i32 {
print("hello, align")
return 0
}
Run it with:
alignc run hello.alignIf you built from source, use ./target/release/alignc in place of alignc
and ./target/release/align-repl in place of align-repl, from the repository root.
While editing, keep the compiler running and rebuild whenever one of the source files or other inputs it used changes:
alignc build hello.align --watchThe process keeps the last successful executable in place. Toolchain and library replacements are picked up by the next observed source/input change, or immediately after restarting the command.
You can also try expressions with align-repl. Each entry adds to the session's program, which
alignc compiles and runs as a native executable.
align-replalign> 1 + 2
3
The guide explains syntax, tools, and libraries through worked examples:
Tutorial (English) · Tutorial (Japanese)
The Little Aligner (Japanese) teaches through short questions and answers, in the tradition of The Little Schemer. Start here if you want to work out each step yourself: predict a result, follow the data, and reason about ownership and cost. The two books can be read independently or alongside each other.
draft.md— authoritative language specificationdocs/guide/— hands-on tutorial (English + Japanese)docs/little-aligner/— Q&A drill workbook in the style of The Little Schemer (English + Japanese)docs/— design rationale, history, non-goals, open questionsdocs/impl/— compiler implementation plan + std module design specsapps/— first-party package workspaces, includingpkg.web,pkg.auth, andpkg.kveditors/— Vim / Emacs / VS Code support (syntax, snippets)crates/— thealignccompiler workspace
Dual-licensed under either of:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)