3 ms·
I need to do some reading up on Nix, because I don't think I understand it. I thought NixOS was an operating system and Nix an operating system-level package ma
by bmitc 3y ago
I need to do some reading up on Nix, because I don't think I understand it. I thought NixOS was an operating system and Nix an operating system-level package manager, so why is it trying to replace Cargo, a package manager for a specific programming language in Rust?
- from-nibly 3y agoBecause nix is also the build tool that the packages are built with.
- mid-kid 3y agoFor the same reason debian's APT manages rust dependencies for its packages - an OS-level package manager needs to support all its languages. Language-specific package managers fall short as they don't (and often can't) consider cross-language dependencies.
- cstrahan 3y agoThe same reason Bazel builds avoid using Cargo when building Rust software, so I'll describe why Bazel would do this: - Bazel wants to cache remote resources, like each respective crate's source files. - Bazel then wants to build each crate in a sandbox, and cache the build artifacts. Because bazel owns this process, instead of Cargo, it can trivially distribute those build artifacts to other developers, or in CI, etc -- instead of everyone having to build everything from scratch. This is an established practice, and Nix wants to drive the build for the same reasons. See: - https://github.com/bazelbuild/rules_rust https://github.com/bazelbuild/rules_rust - https://github.com/google/cargo-raze https://github.com/google/cargo-raze