A systems programming language that compiles to native code via LLVM. Fast, safe, and designed to feel less hostile than existing native languages.
Specification | Contributing | Editor Support | Devlog
Current language-design status (2026-07-23): D22 has been accepted and documented in specification v7.2, but implementation is still in progress. Owning keyed-map lookup uniformly returns
Option[&V]; contextual Copy and transparent view-origin propagation complete its ergonomic and safety story. Seedocs/decisions.mdD22. Current compiler behavior is not precedent where the decision marks it NON-COMPLIANT.
-
Performance: Compiles to native machine code via LLVM. No runtime interpreter, no GC pauses. Suitable for games, AI infrastructure, embedded systems, and web services.
-
Safety: Ownership-based memory model with no use-after-free, no double-free, and no data races — without lifetime annotations. Ownership is persistent, borrowing is ephemeral, long-lived relationships use handles.
-
Ergonomics: Indentation-based scoping, type inference, f-string interpolation, first-class regex,
let ... elsefor early returns,withblocks for scoped mutation, and seamless C interop viac_import. The common case should not require ceremony.
print("Hello, World!")
var nr = 0
for line in file.read_lines("server.log"):
nr += 1
if line =~ /error (\d+)/:
print(f"{nr}: {line}")
fn handle(req: Request) -> Response:
let user = db.find_user(req.params.id) else:
return Response.not_found()
Response.json(user)
let config = with Config.default() as mut c:
c.timeout = 30
c.retries = 3
Install the latest release on macOS arm64 or Linux x86_64:
curl -fsSL https://withlang.org/installer/install.sh | shInstall the latest release on Windows x86_64 from PowerShell:
irm https://withlang.org/installer/install.ps1 | iexOr from cmd.exe:
curl.exe -L -o install.cmd https://withlang.org/installer/install.cmd
install.cmdInspect the installers before running them:
curl -fsSL https://withlang.org/installer/install.sh | lessirm https://withlang.org/installer/install.ps1The same scripts are also published as release assets — swap the URL for
https://github.com/withlang-dev/with/releases/latest/download/install.sh
(.ps1, .cmd) if you prefer to pin to a GitHub release.
The Unix installer writes with to ~/.local/bin by default. The Windows
installer writes with.exe to %USERPROFILE%\.local\bin by default. Set
WITH_INSTALL_DIR to choose another directory.
Make sure the install directory is on your PATH, then run:
with run examples/hello.wAll release binaries are listed on the releases page.
Run with from anywhere:
$ nix run github:withlang-dev/with# -- -e 'print("hello!")'
hello!Build the binary distribution:
nix buildThe Nix package installs pinned upstream release binaries for macOS arm64 and
Linux x86_64.
nix run and nix build select the matching release asset.
It does not rebuild the compiler from source.
Requirements: just git. With is self-contained — the release binary embeds
its LLVM/Clang/lld toolchain and links it statically, and with build fetches
the pinned static SDK into .deps for the bootstrap. There is no external
LLVM, no clang on PATH, nothing to install.
The compiler is self-hosting. The build chain is seed -> stage1 -> stage2:
git clone https://github.com/withlang-dev/with.git
cd with
with build :seed # download the seed pinned in seed.lock (if `with` is not on PATH)
with build # build the compiler
with build :test # run test suiteseed.lock names the published release every build starts from; with build :seed-driver (first in :test) refuses a battery driven by any other compiler.
Install to your PATH:
with build :install-user # installs to ~/.local/bin/withRelease publishing uses the checklist in docs/with-release-runbook.md.
The compiler compiles itself. with build :fixpoint builds stage3 from stage2
and verifies they are byte-identical. If fixpoint breaks, the compiler has a
nondeterminism bug.
with build :fixpointFor crashes, use lldb on the smallest reproducing command. For deep compiler
bugs, reduce the input and use the targeted MIR/debug tools before adding trace
prints:
./out/stage/bin/with-stage2 reduce repro.w --contains "panic" -- ./out/stage/bin/with-stage2 check {file}
./out/stage/bin/with-stage2 check repro.w --trace-place main:_1
./out/stage/bin/with-stage2 check repro.w --explain-mir-origin main:_1
./out/stage/bin/with-stage2 check repro.w --trace-ownership main:_1
./out/stage/bin/with-stage2 check repro.w --dump-drop-plan
./out/stage/bin/with-stage2 check repro.w --validate-all
with build :fixpoint-diffFor drop, lifetime, double-free, use-after-free, or leak bugs in With-allocated memory, start with the native debug allocator:
./out/stage/bin/with-stage2 run --debug-alloc repro.w
./out/stage/bin/with-stage2 run --debug-alloc --debug-alloc-filter=non-root repro.w
./out/stage/bin/with-stage2 check repro.w --dump-drop-state
./out/stage/bin/with-stage2 check repro.w --dump-place-map
with build :debug-alloc-testsThe tools are documented in docs/deep-debugging-tools.md and docs/debug-allocator.md. Contributor workflow details are in CONTRIBUTING.md.
The compiler includes a built-in language server (with lsp) with diagnostics,
go-to-definition, hover, and format-on-save. Setup instructions for VSCode,
Neovim, Vim, Emacs, Zed, and Helix are in docs/feature_plans/editor-support.md.
See CONTRIBUTING.md for build setup, architecture overview, testing, and debugging instructions.
With is distributed under the MIT License.