Hey folks, I have just released a side project I've been working on for a bit:
cargo-fund. It looks at your workspace's transitive dependencies, searches the Github API for sponsorship information, and displays the funding links associated with those dependencies.
For example, running
cargo fund on itself looks like this (edited with new environment variable):
$ CARGO_FUND_GITHUB_API_TOKEN=... cargo fund /path/to/cargo-fund (found funding links for 21 out of 149 dependencies) ├─┬─ https://www.buymeacoffee.com/dannyguo │ ├─ https://www.paypal.me/DannyGuo │ └─ https://ko-fi.com/dannyguo │ └─ strsim 0.8.0 ├─── https://github.com/sponsors/XAMPPRocky │ └─ remove_dir_all 0.5.2 ├─── https://github.com/sponsors/dtolnay │ ├─ anyhow 1.0.28 │ ├─ dtoa 0.4.5 │ ├─ itoa 0.4.5 │ ├─ quote 1.0.3 │ ├─ ryu 1.0.4 │ └─ syn 1.0.18 ├─── https://github.com/sponsors/seanmonstar │ ├─ httparse 1.3.4 │ ├─ num_cpus 1.13.0 │ ├─ reqwest 0.10.4 │ ├─ try-lock 0.2.2 │ ├─ unicase 2.6.0 │ └─ want 0.3.0 └─── https://patreon.com/retep998 ├─ kernel32-sys 0.2.2 ├─ winapi 0.2.8 ├─ winapi 0.3.8 ├─ winapi-build 0.1.1 ├─ winapi-i686-pc-windows-gnu 0.4.0 ├─ winapi-x86_64-pc-windows-gnu 0.4.0 └─ ws2_32-sys 0.2.1
Note that a Github personal access token is currently required; see the README for details on setting one up. In a future release, I hope to set up an OAuth authentication flow to make this less painful, but Github's OAuth implementation is rather unfriendly for CLI apps.
cargo-fund makes it easier for individual Rustaceans to support the libraries they depend on. I also hope that corporate Rust users in particular can use this information to build support within their organizations for sponsoring open-source dependencies. Please let me know if you have suggestions for how the tool can help you be a more effective advocate (additional sources of sponsorship data? more useful output formats?).
cargo-fund is released, I'm going to be looking through the repos of a number of the top crates on crates.io, and opening PRs if they mention fundraising in their docs, but don't have a
.github/FUNDING.yml file. This is a relatively new mechanism from Github, so I hope the number of visible sponsorships will grow