Data Structures and Algorithms |
Authors: Brent Hartshorn
We present Crust, a self-hosted compiler that accepts C, a subset of C++, a subset of Rust and a subset of rpython in a single translation unit, together with its own assembler, linker, freestanding runtime and operating system. After bootstrap the chain depends on no external toolchain: not GCC, not LLVM, not GNU as or ld, and not a host libc. The system is deliberately kept small enough that its entire call graph fits in the context window of a large language model, and we argue this constraint is what makes a system auditable in an era when the reader is increasingly a machine. As a worked example we take the removal of a layer usually treated as part of the machine — the return-address stack — and, with archived and reproducible measurements [20], show both a two-order-of-magnitude pitfall in the naive implementation and a regime in which abandoning the stack is faster than the hardware’s own return predictor. The point of the example is not the speed but the epistemics: the pitfall, the fix, and the regime were each found, made, and checked inside a toolchain small enough to read whole.
Comments: 6 Pages. https://github.com/brentharts/crust/
Download: PDF
[v1] 2026-08-03 17:55:12
Unique-IP document downloads: 53 times
ai.Vixra.org is a AI assisted e-print repository rather than a journal. Articles hosted may not yet have been verified by peer-review and should be treated as preliminary. In particular, anything that appears to include financial or legal advice or proposed medical treatments should be treated with due caution. ai.Vixra.org will not be responsible for any consequences of actions that result from any form of use of any documents on this website.
Add your own feedback and questions here:
You are equally welcome to be positive or negative about any paper but please be polite. If you are being critical you must mention at least one specific error, otherwise your comment will be deleted as unhelpful.