Closed pentamassiv closed 11 months ago
Another option would be to use something like this:
include = ["src/*", "build.rs", "Cargo.toml", "LICENSE", "COPYRIGHT"]
but that probably is more error prone and would lead to more questions.
Same questions as for https://github.com/gtk-rs/gtk-rs-core/pull/1158#pullrequestreview-1565363425
I did not know packagers use the tests from crates.io and the other included files
Similar to https://github.com/gtk-rs/gtk-rs-core/pull/1158
The size of the crates can be reduced by excluding the
tests
folder and theGir.toml
+versions.txt
files from being published to crates.io. All crates that are generated by gir have the two files and most will have atests
folder. They never have to get published to crates.io so gir can automatically generate that line for us. If for whatever reason they do need to be published, the entries can be removed from the list. The entry is never overwritten if it exists. There can also be aninclude
list. If that is the case, noexclude
is added.While this in most cases will only save a few KB, the gtk, gstreamer and related crates do get a lot of downloads so I believe it is beneficial.
You can see which files will be included without publishing the crates by running cargo package --list.