Files
PartoufandClaude Opus 5 c9ed05dc7d feat(cargo): use the libraries picked in the Libraries pane
Compiler Explorer's Rust crates are prebuilt rlibs fetched from Conan,
and setupBuildEnvironment already unpacks them into the project before
the sandboxed build -- they just never reached rustc. cargo cannot
resolve them itself, since it wants sources from a registry and there is
no network on a build node, so the driver now passes them straight
through as --extern via CARGO_ENCODED_RUSTFLAGS. `use rand::Rng;` works
with nothing declared in Cargo.toml, which is the same mechanism the
single-file Rust path has always used.

The encoded form is used rather than RUSTFLAGS because it is
separator-delimited, so paths and flags containing spaces survive.

A [dependencies] entry still cannot work, and cargo's message for it --
"no matching package named ..., location searched: crates.io index" --
gives no hint that the Libraries pane is the answer. Build steps gained
an optional explainFailure hook for exactly this: turning a build tool's
own diagnostics into something actionable in Compiler Explorer's terms.
The Cargo example manifest says the same thing up front.

Verified in the browser and by API: selecting rand 0.8.5 downloads the
package, builds, and runs, and declaring it in [dependencies] instead
now fails with an explanation rather than a bare resolution error.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 18:35:35 +02:00
..
2026-07-14 08:46:10 +01:00
2021-10-05 01:45:05 +02:00
2019-08-21 01:26:16 +02:00
2025-01-29 10:41:03 -06:00
2021-09-13 20:22:27 +02:00
2024-10-26 17:42:22 +02:00
2024-03-08 22:25:09 -06:00
2024-03-08 22:25:09 -06:00
2024-03-08 22:25:09 -06:00
2026-02-08 12:50:20 +01:00
2024-03-08 22:25:09 -06:00
2024-03-08 22:25:09 -06:00
2025-07-28 10:34:46 -05:00