Rather than modifying your dependencies in the cache directory (which is really not a good idea), consider cloning the repo directly. You can use a patch entry in your Cargo.toml
to have all references to iced_wgpu
point to your local modified copy.
Rust
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
OP really needs to heed this advice. Modifying things in the cache will cause breakages that will confuse the hell out of you.
It was a quick test to see if I could replicate this fix. I undo all my changes after such sessions.
rust-analyzer I believe will compile all the deps the first time it runs. This will take some time but after that it should be fast. If you run a cargo clean that will wipe everything and you will have to wait again. So dont do that. clean should be something you run sparingly not before every compile.
cargo clean -p crate_name
cleans the specified crate and only the specified crate, so dependencies don't get touched.
but wanted to tweak its source code for some reason, so I jumped into the folder where cargo downloads dependencies, and went into iced_wgpu 13.5 (I think that’s the version)
This is not the way you should be doing this. Do not edit cargo's downloaded source code, that's just wrong.
If you want to patch a dependency, use cargo's specific features for doing that.
Not related to your question at all, but:
I don't recommend editing the source code from cargo's files. Instead, the correct way to modify a dependency would be making a fork and using it as a gift dependency (or path dependency, which is even easier).
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?
column![]
does indeed exist.