3 ms·
You can see for yourself here: https://codeberg.org/ditzes/ditzes/src/branch/master/src-tauri/Cargo.toml https://codeberg.org/ditzes/ditzes/src/branch/master/sr
by capableweb 4y ago
You can see for yourself here: https://codeberg.org/ditzes/ditzes/src/branch/master/src-tauri/Cargo.toml https://codeberg.org/ditzes/ditzes/src/branch/master/src-tau...
My project have ~30 dependencies defined for various features in the client. The rest are transitive.
Here is the output of cargo tree for your leisure: https://pastebin.com/aep1bX4v https://pastebin.com/aep1bX4v
A quick scan of cargo tree seems to indicate most of them comes from tauri and actix projects.
Edit: oh, and also tantivy (a search engine) ends up pulling in ~300 dependencies which is a pretty big chunk of the total
- epage 4y agoSomething for people to keep in mind that this is pulling in the source for: - An electron-like framework - A web framework - Multiple HTTP clients - An HTML parser - An image editor - A search engine Some potential dependency savings I noticed: How come you pull in both isahc and reqwest? On the surface, don't they fill the same role? Similar for rustls and openssl. If you upgrade your readability dependency, you will only pull in reqwest once instead of twice. Might be useful to run `cargo tree -d`. I'm not familiar with savefile? What does that get you over serde_json which you also pull in?
- capableweb 4y agoThanks a lot for taking a look at the dependencies! I'm gonna be honest and say that I haven't spent much time "optimizing" anything, I haven't even arrived at a "first" version yet with Ditzes. But with that said, you have some good points :) > How come you pull in both isahc and reqwest? On the surface, don't they fill the same role? Similar for rustls and openssl. Yes indeed. I started with using reqwest, but it's no longer used and only isahc is used, so reqwest can be removed from the list. Same with openssl/rustls. Started with rustls, but not longer used, so can also be removed. Simply forgot to remove them at one point I guess. > If you upgrade your readability dependency, you will only pull in reqwest once instead of twice. Might be useful to run `cargo tree -d`. Ah, that's good to know. I'll do that once I put in some other changes, thanks! > I'm not familiar with savefile? What does that get you over serde_json which you also pull in? Rust savefile persists structs as binary data on disk, and also have versioning. Started out persisting everything as JSON, but loading thousands of posts (or even hundreds) from disk and deserializing them from JSON turned out to be quite slow. So using savefile mainly for performance, but I like the versioning/migration aspect of it as well, although I haven't used it yet with Ditzes. serde_json is mainly used to parse responses from the HN API and to output JSON from the HTTP API, if I recall correctly.
- epage 4y ago`cargo udeps` tries to uncover unused dependencies. I wish we had more reliable ways to detect it so we could integrate it into cargo.