oxalica / rust-overlay
Pure and reproducible nix overlay of binary distributed rust toolchains
View on GitHubAI Architecture Analysis
This repository is indexed by RepoMind. By analyzing oxalica/rust-overlay in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewrust-overlay *Pure and reproducible* packaging of binary distributed rust toolchains. A compatible but better replacement for rust overlay of [nixpkgs-mozilla], with also non-overlay and [Nix Flake][flake] interfaces (despite the project name). [flake]: https://wiki.nixos.org/wiki/Flakes For migration from [nixpkgs-mozilla], see this section. Features: • Hashes of toolchain components are pre-fetched in tree, so the evaluation is *pure* and no need to have network access. • These hashes are auto-updated daily using GitHub Actions. • Current oldest supported stable version is 1.29.0 which are randomly picked. Stable versions will not be purged currently. • Current oldest supported nightly version is 2025-01-01. To prevent significant repository size bloating, our current strategy is keep only nightly and beta versions not earlier than . Earlier versions may be accessed via old snapshot tags. • We targets nixos-unstable and supported releases of NixOS, on x86\_64-linux. They are tested on CI. Other platforms and nixpkgs channels may also work but is not guaranteed. Documentations: • API References • Cross compilation Installation Classic Nix overlay You can put the code below into your . Then the provided attribute paths are available in nix command. Alternatively, you can install it into nix channels. And then feel free to use it anywhere like in your nix shell environment. Nix Flakes **Warning: Only the output / are currently stable. Use other outputs at your own risk!** For a quick play, just use to bring the latest stable rust toolchain into scope. (All commands below requires preview version of Nix with flake support.) Use in NixOS Configuration Here's an example of using it in nixos configuration. Use in for Running will create a shell with the default beta Rust toolchain installed: Migration from [nixpkgs-mozilla] • Change the channel URL to , or flake URL to for Nix Flakes. • Good to go! , and friends are made compatible with [nixpkgs-mozilla]. You don't necessary need to change anything. • You can also optionally change to the interface, which provides more functionality like "latest nightly with specific components available" or "from file". It also has nix-aware cross-compilation support. Cheat sheet: common usage of • Latest stable or beta rust profile. It provides the same components as which installed by 's or profiles. Almost always, is what you want for development. *Note: For difference between and profiles, see [rustup - Profiles][rust-profiles]* • Latest stable or beta rust profile, **with extra components or target support**. • Latest **nightly** rust profile. *Note: Don't use . Your build would fail when some components missing on some days. Always use instead.* • Latest **nightly** rust profile, **with extra components or target support**. • A specific version of rust: *Note: All of them are -able like examples above.* • If you already have a [ file for rustup][rust-toolchain], you can simply use to get the customized toolchain derivation. • Toolchain with specific rustc git revision. This is useful for development of rust components like [MIRI][miri], which requires a specific revision of rust. *Warning: This may not always work (including the example below) since upstream CI periodically purges old artifacts.* • There also an cross-compilation example in [ ]. License MIT licensed. [nixpkgs-mozilla]: https://github.com/mozilla/nixpkgs-mozilla [rust-toolchain]: https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file [rust-profiles]: https://rust-lang.github.io/rustup/concepts/profiles.html [miri]: https://github.com/rust-lang/miri [ ]: https://github.com/oxalica/rust-overlay/tree/master/examples/cross-aarch64