nix-community / crate2nix

rebuild only changed crates in CI with crate2nix and nix
https://nix-community.github.io/crate2nix/
Apache License 2.0
338 stars 82 forks source link

Compatibility with rust-analyzer (rust-project.json + check command) #268

Open jordanisaacs opened 1 year ago

jordanisaacs commented 1 year ago

It would be interesting to allow skipping cargo compilation entirely during development. Generate a rust-project.json that points to the nix built dependencies. And a crate2nix check command that builds the workspace pointing to the nix dependencies along with the --error-format=json. This workspace build wouldn't be done in Nix.

I recently did some work on getting rust-analyzer working for kernel rust development (which doesn't use cargo) so have some experience. Would be interested in helping out if this is sounds feasible, but not familiar with the crate2nix internals.

See: https://rust-analyzer.github.io/manual.html#non-cargo-based-projects