Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[unstable]
codegen-backend = true

[profile.dev]
codegen-backend = "cranelift"

[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
key: cross-${{ env.CROSS_REVISION }}
- name: Install cross
env:
# Clear repository build flags from .cargo/config.toml (mold linker
# and Cranelift codegen-backend) before installing cross from CROSS_REVISION.
# Clear the repository's mold linker rustflags from
# .cargo/config.toml before installing cross from CROSS_REVISION.
RUSTFLAGS: ""
run: |
if [ -x "$HOME/.cargo/bin/cross" ]; then
Expand All @@ -74,8 +74,9 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.target }}-
- name: Build release binary
# Use +stable to override rust-toolchain.toml (which specifies nightly
# with Cranelift for development) and ensure release builds use stable.
# Use +stable to override rust-toolchain.toml's nightly pin (needed
# for the repository's lint and dev-fast tooling) so release builds
# use stable regardless.
env:
# Build release artifacts without repository-local linker flags,
# including mold rustflags from .cargo/config.toml.
Expand Down
7 changes: 7 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Canonical rustfmt configuration for the estate. In a consuming
# repository this file lives at the root as `.rustfmt.toml`; keep it
# there, aligned with canon (the rust-rustfmt-baseline rule FMT-001
# compares the parsed keys).
#
# `unstable_features = true` means rustfmt must run on the nightly channel;
# the rust-rustfmt-baseline rule (FMT-002) checks for that evidence.
unstable_features = true
comment_width = 100
format_code_in_doc_comments = true
Expand Down
23 changes: 23 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,26 @@ The following tooling is available in this environment:

These practices help maintain a high-quality codebase and facilitate
collaboration.

## Fast development builds

`make dev-build` and `make dev-test` compile with the opt-in Cranelift
backend and the mold linker configured in `tools/dev-fast/config.toml`.
They require a nightly toolchain and, on Linux, a `mold` binary on the
`PATH`. The fragment is passed explicitly with `--config`, so release,
coverage, and verification builds are unaffected; never copy its contents
into `.cargo/config.toml`, which Cargo applies to every build.

## Standard development path

The dev-fast profile is the standard development path, not a side path:
`make build`, `make test`, `make lint`, and `make typecheck` all pass
`--config tools/dev-fast/config.toml` to Cargo. An agent or human calling
`cargo build`, `cargo test`, `cargo clippy`, `cargo check`, or `cargo doc`
directly for a development build, test, lint, or typecheck run must pass
that same `--config` flag, or the run will use a different codegen
backend and linker than `make` does. The fragment must never be applied
to coverage, release, or verification builds. Mixing direct-cargo and
`make` invocations without the flag thrashes the incremental build
cache, because Cargo fingerprints the codegen backend and the two runs
produce different fingerprints for what looks like the same build.
299 changes: 299 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading