You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it makes sense to think about the goals of crate2nix and the other two projects providing nix build support to rust. Then we can maybe converge or find at least topics to collaborate on. And we can help nix/rust users choose the best solution for their projects.
This is WIP, feel free to discuss. Obviously, these are goals
Core goals and features:
Generates nix derivations for rust binaries and libraries that have crate cache granularity.
Convenient to use.
Stable interface. Both the CLI and the generated build files should not have random interface changes. Support the old interface in new versions, at least for a while, if offering new interfaces.
Stable implementation. Strong regression tests so that new releases don't break what already worked.
Support bigger workspaces and collaboration. That deserves examples:
crate2nix currently stores hashes of prefetched sources in crate-hashes.json. If this is checked in, this can lead to merge conflicts. Therefore, I propose a change that prevents this: Prevent merge conflicts with crate-hashes directory #82
If crate2nix or evaluating the generated build file takes too long, that's worth some optimizations even if that increases code complexity.
Works out-of-the box for all common open source crates if they are not too crazy (e.g. make building in a sandbox deliberately difficult). This can be achieved by making buildRustCrate and crate2nix better or by getting appropriate pull requests merged.
Make the output reasonably small.
Cross building (currently no support at all):
WASM build support.
Cross builds e.g. for Windows. Might be difficult, I don't know.
Out of scope:
Convenient, non-sandboxed builds.
The text was updated successfully, but these errors were encountered:
I think it makes sense to think about the goals of
crate2nix
and the other two projects providing nix build support to rust. Then we can maybe converge or find at least topics to collaborate on. And we can help nix/rust users choose the best solution for their projects.This is WIP, feel free to discuss. Obviously, these are goals
Core goals and features:
Developer convenience:
cargo test
).crate2nix
currently stores hashes of prefetched sources incrate-hashes.json
. If this is checked in, this can lead to merge conflicts. Therefore, I propose a change that prevents this: Prevent merge conflicts with crate-hashes directory #82crate2nix
or evaluating the generated build file takes too long, that's worth some optimizations even if that increases code complexity.Packaging features:
out-of-tree
builds alanixpkgs
where the root crate/worksapce is fetched. See Convenient support for out-of-tree sources #102buildRustCrate
andcrate2nix
better or by getting appropriate pull requests merged.Cross building (currently no support at all):
Out of scope:
The text was updated successfully, but these errors were encountered: