# Forge

> Drop-in Rust compiler & build cache. Zero LLVM.

## Forge

Drop-in Rust compiler & build cache. Zero LLVM.

- [Visit](https://forge.prismsdk.dev/)

Swap cargo for forge. Forge replaces LLVM with a native Rust backend and adds a shared copy-on-write build store across every project and git worktree.

## Why

Rust compiles through LLVM, and Cargo rebuilds every dependency per checkout and per git worktree. Waiting on builds and watching `target/` directories eat tens of gigabytes slows down every iteration. Forge replaces both with a native compiler backend written in Rust and a content-addressed build store.

## How it works

Forge drops in for `cargo` (`forge build`, `forge test`, `forge run`) with zero changes to `Cargo.toml`:

- **Native Rust backend:** compiles MIR directly to AArch64, x86-64 and WebAssembly machine code with zero megabytes of `libLLVM`
- **Shared build store:** `~/.forge/store` deduplicates compiled crates across projects and git worktrees using APFS `clonefile` / hardlinks — a second worktree builds in 0.17 s instead of 7.11 s
- **Cross-compilation out of the box:** 19 native targets including zero-setup static `linux-musl` (`rust-lld`), macOS, Windows MSVC and `wasm32`
- **Native hosts:** runs natively without LLVM on macOS, Linux (arm64 & x86-64) and Windows

## What comes with it

Built-in tools with zero extra installs: `forge docker` (deterministic BuildKit cache & native Linux builds), `forge watch`, `forge test --fast` (parallel process-per-test runner), `forge size` / `bloat`, `forge timings`, `forge audit` (RustSec + SBOM), `forge unused`, `forge outdated`, `forge dist` and `-Z stack-protector` + DWARF `file:line:column` debuginfo.

## Try it

`curl -fsSL https://raw.githubusercontent.com/0xtlt/forge/main/install.sh | sh`

`forge build --release`

Open source since v0.1.0 — already compiles `rustc` itself (`librustc_driver`) in 72 s with 0 MB of LLVM.

**Role**\
Author

**Status**\
v0.1.0 · Open source

**Built with**\
Rust

**License**\
Apache 2.0 or MIT

**Links**\
[Website](https://forge.prismsdk.dev/)\
[GitHub](https://github.com/0xtlt/forge)

## More projects

### [Prism SDK](https://www.thomastastet.com/projects/prism)

One Rust codebase, native UI everywhere.

### [Local Storefront](https://www.thomastastet.com/projects/local-storefront)

Shopify themes and apps on your machine, without Shopify.

### [MyMCPs](https://www.thomastastet.com/projects/mymcps)

Every MCP server behind one endpoint.

---

Thomas Tastet · <https://www.thomastastet.com/projects/forge>
