BurntSushi / rust-snappy

Snappy compression implemented in Rust (including the Snappy frame format).
BSD 3-Clause "New" or "Revised" License
444 stars 43 forks source link

3 MB of test files are uploaded to crates.io #37

Closed coderbot16 closed 3 years ago

coderbot16 commented 3 years ago

Hi, awesome crate you have here!

I noticed while using cargo-vendor that the "data" directory of this repository is uploaded to crates.io, turning a 126kB (44.1kB compressed) crate into a 3MB (1MB when compressed) crate. It doesn't appear like these test files are referenced in the uploaded crate, so it would make sense to somehow prevent them being uploaded.

Based on this documentation, it seems like adding the following to Cargo.toml would prevent these data files from being uploaded with the crate. significantly slimming down the download:

exclude = [
    "data/*"
]

If you'd like, I can open a PR with that change, but unfortunately I don't think that there's a way for me to properly test it.

Thanks!

BurntSushi commented 3 years ago

Good catch. These data files used to be used in tests for the snap crate itself, but the tests were somewhat recently refactored into a separate snap-test crate. So there's no point in keeping the data files inside the crate. I've fixed this in snap 1.0.3.