blaze README

项目的 README,来自 github.com/indexable-inc/blaze。合并为一个 markdown 文件:README.md。

blaze

Rebuild Rust in milliseconds.

Type blaze wherever you'd type cargo.
Blazingly fast Rust, literally.

Install · Try it · How fast · How it works · Docs

Install

curl -fsSL https://ix.dev/blaze | sh

For macOS on Apple silicon and Linux, with or without Rust installed: blaze builds with its own Rust, whatever rustup or the project pins, and the installer downloads it once (about 125 to 160 MB; none when rustup already has that same nightly; v2's blaze cannot fetch it yet: toolchain.md). Rather use crates.io or Nix? Other ways to install.

That installs stable: a release that passed the heavy tests (real projects on macOS and Linux: cargo, zed, servo, bun, NVIDIA Dynamo, fff, fframes, flox and OpenAI's Codex CLI each build, build again after an edit faster than with cargo, and pass their tests). Canary is the newest release, out as soon as it is built and promoted to stable unchanged once it passes them (release.md):

curl -fsSL https://ix.dev/blaze | sh -s -- --channel canary

Try it

In any Rust project:

blaze run     # like cargo run
blaze test    # like cargo test
blaze build   # like cargo build

The first build loads your project and compiles every crate of it, with no cargo build and no rustc. Then change a function and build again: blaze's daemon, still running, builds only what the edit changed. blaze answers build, check, run, test and bench; other cargo commands are not blaze's yet.

How fast

These numbers are blaze v1's; v2 has not been measured yet.

Edit one function, then build (Linux x86-64) cargo build blaze build
ripgrep 508 ms 56 ms (9.1× faster)
nushell 1.25 s 236 ms (5.3× faster)
helix 2.15 s 116 ms (19× faster)
bun (1.25M lines of Rust) 9.11 s 451 ms (20× faster)

Every project, platform, chart, and the memory and disk it takes: benchmarks.

Over time

How blaze's own numbers move from run to run, each platform on its own benchmark machine: the instructions each merge to main retires, how long an edit takes and how soon a live edit runs, from the history (how it is kept). Every workflow that adds to the history draws these again and commits them with it.

From saving an edit to the program running it, macOS arm64: 11 runs from Oct 21 to Oct 30, the first to the latest: bevy 83 ms to 3.79 s; egui 15 ms to 219 ms; life 22 ms to 34 ms (Oct 26); probe 7.7 ms to 14 ms

Not drawn until there are two runs on one machine: macOS arm64 instructions per merge (none yet), macOS arm64 edit times (one run), Linux aarch64 instructions per merge (none yet), Linux aarch64 edit times (one run), Linux x86-64 instructions per merge (none yet), Linux x86-64 edit times (one run), Windows x86-64 live-edit latency (one run).

How it works

blaze's daemon keeps your project compiled in memory, with no cargo or rustc under it. After an edit it compiles only the functions you changed and links the program again with its own linker. More.

Good to know

All the details: what works and what doesn't yet.

Learn more

Demo: a Game of Life you can edit

nix run github:indexable-inc/blaze#life

This opens a Game of Life window. On macOS on Apple silicon you can change its rules, colours and speed while it runs (live edits are blaze v1's; v2 does not have them yet); elsewhere the window runs without live edits. It needs Nix, and builds blaze from source the first time.

Editing the running Game of Life: rule, colours and speed change live

Updates

What's new has every change worth knowing, each as a short lesson on the course, with the ones new since your last visit marked. For release news: Watch → Custom → Releases on GitHub.

Using blaze at work?

We're working with a few teams on fast Rust CI and remote builds, built on blaze. If your team waits on Rust builds, tell us what slows you down: [email protected]. Teams we work with get early access and a direct say in what we build next.

Contributing

How to build blaze from a checkout, run its tests and send a change: docs/contributing.md. To report a security problem: .github/SECURITY.md.

Credits

blaze stands on the shoulders of giants. Thank you to the people who built:

None of these projects endorses blaze.

blaze was called ra-jit until 2026-10-24; Made at ix for den's native app. MIT or Apache-2.0.

blaze (indexable-inc/blaze)

正在搜索数据库…

2.4K ·GitHub
这是什么?Blaze 是一个位于 cargo 前面的工具,它只编译你修改过的函数,并将其补丁式地写入已构建好的可执行文件中,而不是从头重新链接,从而大幅加快 Rust 的增量构建速度。
它是 cargo 的替代品,还是与 cargo 配合使用?它是一个包装命令行工具(CLI),除增量构建外,所有命令都会直接转交给 cargo 处理;增量构建则由它自己拦截并加速。你仍然沿用原来的工作流程,只需通过 'cargo blaze' 使用即可。
我该如何安装并开始使用?在 macOS(Apple Silicon)或 Linux 上安装 blaze,然后在任意 Rust 项目中运行 'cargo blaze build' 或 'cargo blaze run',而不是普通的 cargo 命令;第一次构建时,blaze 加载期间会运行普通的 cargo,之后的修改只需几毫秒即可重新构建。
我需要先安装 Rust 或 rustup 吗?不需要。如果你没有安装 Rust,blaze 会下载它自带的固定版本 Rust 工具链(约 100 到 135 MB);如果你已经安装了 rustup,它则使用 rustup 的安装。
它在 Windows 上能用吗?暂时不支持。blaze 目前只在 macOS(Apple Silicon)和 Linux 上提供加速;在 Windows 上,每次构建都会退回到普通的 cargo,没有任何加速。
现在可以放心用于生产环境构建吗?目前还不完全可靠。项目方明确表示它还很年轻,建议以 'cargo check' 或你的 CI 为最终依据,因为 blaze 的输出偶尔可能与普通 cargo 不一致。
使用 blaze 构建比普通 cargo 快多少?在真实项目上取平均值,修改后的重新构建在 macOS arm64 上约快 10 倍,在 Linux aarch64 上约快 24 倍,在 Linux x86-64 上约快 11 倍;例如,bun 的 125 万行代码库每次重新构建从 9.11s 降到 451ms。
它在内存和磁盘空间上要付出多少代价?Blaze 通过把你的项目保存在内存中编译来换取速度,即使是小项目,也要占用几 GB 的内存。
正在运行的程序能否不重启就获取代码修改?可以。如果程序选择支持,它就能在保持运行的同时加载新编译的代码,从保存文件到更新后的代码真正运行,大约只需 20ms,实现实时编辑。
项目为什么从 ra-jit 改名?Blaze 在 2026-10-24 之前叫 ra-jit;旧的 'cargo ra-jit' 命令仍然可用,但项目现在名为 blaze。
有哪些类似的项目?goose, wild, gcc, BitKindle, rust, scriptc, carbon-lang, swift
大小
204.4 MB
星标
2.4K
时长
30天
提交 · 90 天