cargo install
is for installing rust programs for your user, not for adding dependencies to your Rust project. Many cargo subcommands can be installed this way, for instancecargo bloat
.- The file you are talking about is called
Cargo.toml
, because it is the file you need to write in order to configure cargo for your Rust project. TOML is the name of the file format. For details, please see the introductory chapter to Cargo in the Rust book. - Cargo recently got a new subcommand called
cargo add
, which allows to add dependencies directly on the command line. However, all it does is to add/edit/remove the respective lines in Cargo.toml. (Personal opinion: I have found it way easier to just edit the file directly than to learn yet another command…)
That said: You still need to edit the Cargo.toml file, even if you solely use cargo add
to manage your dependencies. That’s because that file contains a lot more information about your project than just the dependencies. For instance the current version, the feature-flags, your name, a link to the public repo,…
No solution, but I have a similar issue with the higher crate.
There the /prelude/src/lib.rs file lets rust-analyzer lose its mind and allocate gigabytes upon gigabytes of memory, even though the file compiles just fine and nearly instantaneous…
I think this has something to do with recursive macros. Doesn’t iced also have such? I have faint memories of a column! macro?