# bugfind toolchain (Rust -> Charon -> Aeneas -> Lean), built 2026-10-14 Everything lives under `/apps/development/rlhf/toolchains/`; `source bugfind/env.sh` sets `HOME`, `RUSTUP_HOME`, `CARGO_HOME`, `OPAMROOT`, `ELAN_HOME`, `TMPDIR`, `XDG_*` there. One command rebuilds from scratch (idempotent): `bash bugfind/setup_toolchain.sh`. Nothing under `align/` imports `bugfind/`. | Component | Version / commit | Where | |---|---|---| | rustup | 1.29.1 | `toolchains/cargo/bin/rustup` (no default toolchain except `stable`, see below) | | Rust nightly for Charon | `nightly-2026-09-17` (+ rustc-dev, llvm-tools, rust-src, miri) from Charon's `rust-toolchain` | `toolchains/rustup` | | Charon | `b05c4774638599608f26b777b6bc49120446365a` (2026-10-12), the commit pinned by Aeneas' `charon-pin`; submodule `crates/minirust` @ `c0b555e5` | `toolchains/src/aeneas/charon/bin/{charon,charon-driver}` (debug build) | | Aeneas | `6c2788d1366f09d69fd55b2b9be71cd17d28a9ab` (2026-10-14, master) | `toolchains/src/aeneas/bin/aeneas` | | OCaml / opam / dune | 5.3.0 (vanilla), opam 2.6.1 (sandboxing disabled: no bwrap), dune 3.24.2 | `toolchains/opam` (switch `5.3.0`) | | gmp | 6.3.0, private prefix (the box has `libgmp.so` but no `gmp.h`; avoided a system `dnf install`) | `toolchains/local` | | elan | 4.2.4 | `toolchains/elan` | | Lean | **`leanprover/lean4:v4.35.0-rc4`** (Aeneas' `backends/lean/lean-toolchain`; the task text said "~4.31", the pin is now 4.35.0-rc4) | `toolchains/elan/toolchains` | | Aeneas Lean lib | `lake build Aeneas AeneasMeta` OK (1790 jobs); Mathlib `v4.35.0-rc4` (rev `1f414401`) via the Mathlib cache (9004 oleans) | `toolchains/src/aeneas/backends/lean/.lake` (8 GB) | | System rustc/cargo | 1.88.0 (Amazon Linux package), used only for mutant differential harnesses and the baseline arms | `/usr/bin` | Disk: `toolchains/` is ~28 GB (src 19 GB incl. Charon `target/`, rustup 3 GB, elan 3 GB, opam 1.5 GB). `/home` free space did not decrease because of this work except for one incident: Charon's miri sysroot goes to `$HOME/.cache/charon` regardless of `XDG_CACHE_HOME` (112 MB landed in `/home` once); it was moved to `toolchains/home/.cache` and `env.sh` now redirects `HOME`. Pre-existing `~/.cargo` (57 MB) and `~/.elan` (946 MB) on `/home` belong to other work and were not touched. `rustup toolchain install stable` (1.99.0) was added as rustup's default so that `cargo`-installed tools (Kani, cargo-fuzz) can build. ## Smoke test (`bugfind/smoke/run_smoke.sh`) : PASSES `smoke/tiny` (4 integer functions; `avg_buggy` computes `(a + b) / 2` in u32 and overflows) -> `charon cargo --preset=aeneas` -> `tiny.llbc` -> `aeneas -backend lean` -> `Tiny.lean` (4 functions translated, 0.6 s) -> `lean` compiles it against the Aeneas library, plus `Check.lean` with three kernel-checked theorems: the overflow witness `avg_buggy 4294967295#u32 4294967295#u32 = fail Error.integerOverflow` (`simp +decide [...]`), the conditional spec of `avg_buggy`, and total correctness of `abs_diff` (`step*`). Wall time of the whole script: ~15 s once Charon's dependencies are cached. ## Things that bit, so the next person does not rediscover them * `make setup-charon` needs `git submodule update --init` in `charon/` (minirust) or the build fails on `miniutil`. * Aeneas' `make` must not run with `MAKEFLAGS=-j*` (parallel `dune build` calls fight over `_build/.lock`); `env.sh` therefore does not set it. * `charon-ml`'s own `make build-dev` wants `odoc`; it is not needed, Aeneas builds charon-ml through dune. * Lean `module`-style files need `lean --root=