Provides Rust toolchains, rust-analyzer nightly, and VS Code extensions for Nix, serving as a replacement for rustup and nixpkgs-mozilla.
Fenix is a Nix-based project that delivers Rust toolchains, rust-analyzer nightly, and its VS Code extension, designed to replace rustup and the rust overlay from nixpkgs-mozilla. It provides flexible integration methods including flakes, packages, and overlays, making Rust development reproducible and declarative within Nix ecosystems. It offers Rust toolchain profiles (minimal, default, complete, and latest nightly), cross-compilation support, and a binary cache for faster builds.
Rust developers working within Nix-based environments who need reproducible and declarative toolchain management, particularly those using Nix flakes, overlays, or packages for their projects. It is also suitable for developers requiring cross-compilation to targets like WASM, Android, or macOS.
Developers choose Fenix over alternatives like rustup or nixpkgs-mozilla because it integrates seamlessly with Nix, offering reproducible builds, flexible toolchain customization, and support for multiple integration methods. Its binary cache and cross-compilation capabilities further enhance development efficiency within Nix ecosystems.
Rust toolchains and rust-analyzer nightly for Nix [maintainers=@figsoda, @eureka-cpu]
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports multiple integration methods—flakes, packages, and overlays—as shown in the README usage examples, accommodating various Nix workflows seamlessly.
Offers toolchains for numerous targets like WASM, Android, and macOS, enabling declarative cross-compilation within Nix, with detailed target lists provided.
Includes a Cachix binary cache for x86_64-darwin, aarch64-darwin, and x86_64-linux, significantly reducing build times for supported platforms.
Allows creating toolchains from manifests, toolchain files, or specific channel/date combinations, giving fine-grained version pinning for reproducibility.
Binary caching is only available for three platforms, and using overlays with older nixpkgs may not be cached, requiring a workaround as noted in the README issue #79.
The 'latest' profile provides the most recent components but risks incompatibility between them, as admitted in the README, which can break builds.
Requires familiarity with Nix concepts and setup, making it less accessible than rustup for developers new to Nix or preferring simpler toolchains.
fenix is an open-source alternative to the following products:
nixpkgs-mozilla is a collection of Nix expressions for building Mozilla software, providing Firefox and other Mozilla applications within the Nix package manager ecosystem.
rustup is the official toolchain installer for the Rust programming language, allowing users to manage multiple Rust versions and associated components.