Files
compiler-explorer/examples
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
..
2022-06-20 12:24:31 +01:00
2025-04-24 09:47:16 +02:00
2023-06-02 08:08:57 -05:00
2018-10-14 01:30:35 +02:00
2025-10-22 09:04:20 -05:00
2021-08-26 21:57:07 +02:00
2026-07-02 18:26:35 +01:00
2023-03-01 06:17:26 +08:00
2022-09-20 07:42:41 -05:00
2020-09-17 21:59:34 -05:00
2022-11-27 10:39:05 -06:00
2022-05-19 13:27:23 +02:00
2022-02-11 16:19:16 +01:00
2023-12-03 11:34:25 -05:00
2024-09-30 22:19:55 -05:00
2025-07-29 16:37:54 -05:00
2022-08-09 07:32:19 -05:00
2023-10-11 15:01:45 -04:00
2025-10-07 14:55:38 -05:00
2019-05-26 19:45:20 +02:00
2023-01-14 15:44:14 +01:00
2021-06-02 22:58:41 +02:00
2026-06-02 12:19:29 -05:00
2023-03-30 18:20:56 +02:00
2026-07-29 15:43:35 +02:00
2020-10-08 23:58:33 +02:00
2025-05-11 16:07:40 -05:00
2025-02-19 10:41:42 -06:00
2018-12-15 21:31:15 +03:00
2021-07-06 08:32:22 -05:00
2026-01-25 16:50:12 -05:00
2022-07-18 20:18:36 +02:00
2022-10-05 09:32:45 +02:00
2021-07-30 16:29:37 -04:00
2021-06-29 09:39:06 +02:00
2026-06-19 11:31:32 -04:00
2022-04-14 02:33:13 +02:00
2024-02-12 21:50:33 -06:00
2025-02-24 09:38:13 -06:00
2020-09-20 01:18:54 +02:00
2022-06-24 22:07:40 +02:00
2023-08-15 22:16:36 -05:00
2023-04-10 22:49:15 -05:00
2024-11-26 16:38:40 -06:00
2024-06-10 21:29:03 -05:00
2024-10-22 06:37:40 -05:00
2018-09-09 23:36:17 +12:00