dream2nix
dream2nix copied to clipboard
Create a granular builder for Rust
This issue will track granular builder for Rust.
TODOs:
- [ ] Introduce a new translator that will use
cargo-lockunderneath but will also perform IFD to get cargo metadata for building packages and write it to the dream-lock.json file. This will allow users to choose the tradeoff; either commit the lockfiles to VCS and have no IFD when building (like crate2nix / cargo2nix), or don't commit and have IFD (but also no longer have to update and commit lockfiles). - [ ] What metadata do we need? We already have a dependency tree for Cargo, albeit it's more like source dependency tree. So we should be able to just store what each crate has as features and also target platform "features", then we can perform feature resolution at build time?
- [ ] Introduce a new Rust builder that will be able to build granularly at a crate level. It should use
buildRustCratefrom nixpkgs. How do we perform feature resolution and target platform resolution?