Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bincode crate on crates.io contains large logo.png file unnecessarily #213

Closed
staktrace opened this issue Oct 13, 2017 · 7 comments
Closed

bincode crate on crates.io contains large logo.png file unnecessarily #213

staktrace opened this issue Oct 13, 2017 · 7 comments

Comments

@staktrace
Copy link

@staktrace staktrace commented Oct 13, 2017

While I appreciate the artistry involved in logo.png, it doesn't seem useful to include that file (or the readme.md/readme.dev.md files) into the packaged crate on crates.io. Currently the published bincode-0.9.0 crate is 72351 bytes and without these files the crate would be only 14601 bytes.

This probably doesn't seem like much, but the logo.png file is 258k uncompressed, which exceeds the 100k file size limit for automatic vendoring into the mozilla-central repository for use in Firefox. It's possible but annoying to work around this, and these files are unnecessary in the packaged crate anyway, so it would be nice to drop them.

@TyOverby
Copy link
Collaborator

@TyOverby TyOverby commented Oct 13, 2017

Wow that's unfortunate.

I've pushed 0.9.1 which has excluded the image. I've kept the readme file because I think it's necessary to get readme rendering in crates.io. I'll experiment with that and see if it's actually necessary.

@staktrace
Copy link
Author

@staktrace staktrace commented Oct 13, 2017

Thanks for the quick turnaround!

@staktrace
Copy link
Author

@staktrace staktrace commented Oct 13, 2017

@TyOverby hmm actually it looks like 0.9.1 still has the logo.png file.

curl --location https://crates.io/api/v1/crates/bincode/0.9.1/download > bincode.tgz
tar tzf bincode.tgz | grep logo.png
@staktrace
Copy link
Author

@staktrace staktrace commented Oct 13, 2017

As far as I can tell the exclude you added to Cargo.toml should work. The only difference I can see from other exclude statements I've used successfully in the past is that you have the "./" at the front of the filename whereas I never had that. Maybe that makes a difference?

@TyOverby
Copy link
Collaborator

@TyOverby TyOverby commented Oct 13, 2017

I've pushed 0.9.2 which I've verified does not contain logo.png.

I've also excluded tests, examples, changelist, and LICENSE because they're not necessary in the package.

@TyOverby TyOverby closed this Oct 13, 2017
@TyOverby
Copy link
Collaborator

@TyOverby TyOverby commented Oct 13, 2017

And yeah, apparently it was an issue with relative paths. Really unexpected issue.

@staktrace
Copy link
Author

@staktrace staktrace commented Oct 13, 2017

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.