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

Update libspng, statically link zlib, and allow using zlib-ng #1

Merged
merged 14 commits into from
Mar 14, 2021
Merged

Update libspng, statically link zlib, and allow using zlib-ng #1

merged 14 commits into from
Mar 14, 2021

Conversation

AlexTMjugador
Copy link
Contributor

@AlexTMjugador AlexTMjugador commented Mar 13, 2021

This rather big PR updates libspng to commit 264476a, updating the generated bindings, documentation, and bumping the version of the crate accordingly.

It also links against zlib statically, because although that wastes the shared zlib library that may be installed on some systems, this allows following the expectation that Rust executables are as self-contained as possible, and reduces problems in case the end system has an incompatible version of zlib or has no zlib at all.

Also, the --size_t-is-usize parameter is added to the buildgen.sh script because of relatively recent changes to bindgen; see rust-lang/rust-bindgen#1671.

Finally, the println!("include=libspng"); call in the build.rs script was removed, as it never did anything, because it should begin with the cargo: prefix for it to be honored somewhere. See https://kornel.ski/rust-sys-crate#headers for details.

This commit updates libspng to the latest commit and bumps the version
of the crate. This libspng update includes enhancements to backward
compatibility with libpng and implements previously no-op CRC actions.

It also updates the bindgen.sh script to work with the latest bindgen
version.
The implementation of FILE is different for several OSes, and previous
commits checked for implementation-specific details that are not
portable.

Fix this by treating FILE as an opaque type.
Copy link
Owner

@aloucks aloucks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thank you. I'll merge and push to crates.io once build.rs has been updated.

spng-sys/build.rs Show resolved Hide resolved
@aloucks
Copy link
Owner

aloucks commented Mar 14, 2021

Could you also add a CHANGELOG entry? Thanks!

@AlexTMjugador
Copy link
Contributor Author

I've just addressed your comments in the latest commits. Thanks!

@aloucks aloucks merged commit 6a95bec into aloucks:master Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants