Adds a second build system, which is the point of the previous phases: CargoBuildSystem builds Cargo.toml projects for Rust, alongside a cargo pseudo-language for the manifest and a TOML Monaco mode. Monaco ships an ini language, but TOML's array-of-tables headers, arrays and inline tables all come out wrong under it, and a Cargo.toml is full of them. cargo comes from the selected compiler's own toolchain -- the sibling of that compiler's rustc -- not a global property: a 1.80 cargo driving a 1.91 rustc disagree about lockfile and edition features. Rust compilers that ship no cargo (gccrs, mrustc, the BPF gcc: 16 of the 120 configured ones) are refused with a clear message, which is why getUnsupportedReason is now async -- it has to stat for the binary. The compiler is injected as RUSTC, user options go through RUSTFLAGS, and CARGO_HOME points inside the sandbox so nothing cargo writes outlives the compilation. Two things needed a new seam. cargo names its output after the manifest rather than putting it where we asked, so finaliseArtifact (new hook, no-op for CMake) copies what it built to the path the rest of the compilation was told to expect, with customOutputFilename choosing between artifacts when a project builds several. And the paths cargo reports are the ones it saw -- the sandbox bind-mounts the project as /app, without a sandbox it is the real temp directory -- so utils.maskRootdir reduces both to a path relative to the project root, which is then rebased onto the real one. Output uses --message-format=json-render-diagnostics: cargo renders diagnostics to stderr, which is what the user reads, and leaves stdout as artifact records for us, which the driver parses and then blanks so the JSON never reaches the output pane. Also fixes the frontend still posting every project build to /build/cmake regardless of what the tree had selected -- phase 2 added the dropdown but never threaded the choice into the request. submitCMake is now submitBuild(buildSystem, request), and the queued next request carries its build system with it. Dependencies are not supported: build nodes have no network, so the build runs --offline and an external crate fails immediately with cargo's own message rather than hanging. That covers #8988 (several modules in one tree) but not #3763; vendoring a registry is infrastructure work and deserves its own phase. Verified in the browser and by API against real toolchains: a three-file Rust tree builds, disassembles to output::square::square, and executes printing 49. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
How do I ?
This is a how-to guide for the user-interface presented by Compiler Explorer. This doesn't cover the details of how to set up or modify Compiler Explorer for your own needs. For that, please check the documents which already cover topics like:
- Adding a language
- Adding a compiler
- Adding a library
- Adding a tool
- and many more at compiler-explorer/docs
Fast links:
Change the assembly syntax from Intel
The option to switch assembly from Intel to AT&T syntax is present in the Output option of each compiler. If enough
space is not present, the option also presents itself as the gear symbol (⚙)
Compare the time taken by compilation and networking
This is the symbol that looks like a bar graph (📊). If your compilations are taking long, you can use this to check the time taken by:
- Networking, JavaScript, waiting for events, etc.
- Checking the cache and retrieving from it on a cache-hit
- Compilation (on force compilation or cache-miss)
- Parsing the generated assembly before presenting it
View intermediate information provided by the compilers
Though both GCC and Clang create supplementary outputs along with assembly (shown by default), and an executable (created if an executor has been added), the exact nature of the outputs and their formats differ between the compilers.
GCC allows the Tree, IPA, RTL and graph outputs, while Clang allows optimization, AST, IR and graph outputs. Some outputs (e.g. RTL or graph) also have a rich set of options in the UI to enable focussing on a particular function or compiler stage.



