saecki / crates.nvim

A neovim plugin that helps managing crates.io dependencies
MIT License
867 stars 30 forks source link

feat: fetch crate versions and deps using sparse registry index #137

Closed saecki closed 4 months ago

saecki commented 4 months ago

This allows correctly resolving all optional dependencies as features (#14), by using cargos sparse registry index protocol. Additionally this avoids the chained two step dependency fetching, but still requires making two requests. Both the sparse index file and the api crate metadata have to be fetched, though that can be done in parallel.

The index files don't contain some fields currently used by crates.nvim: ApiCrate

ApiVersion

these are fetched separately from the crates.io api.