dream2nix icon indicating copy to clipboard operation
dream2nix copied to clipboard

Create a granular builder for Rust

Open 90-008 opened this issue 3 years ago • 0 comments

This issue will track granular builder for Rust.

TODOs:

  • [ ] Introduce a new translator that will use cargo-lock underneath 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 buildRustCrate from nixpkgs. How do we perform feature resolution and target platform resolution?

90-008 avatar Sep 02 '22 03:09 90-008