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-08-05 17:27:51 +02:00
2026-06-04 23:41:19 +02:00
2026-07-02 18:26:35 +01:00
2026-07-02 18:26:35 +01:00
2025-07-28 10:34:46 -05:00
2026-05-23 14:47:16 +03:00