| Crates.io | libpng-vendored-sys |
| lib.rs | libpng-vendored-sys |
| version | 0.1.2 |
| created_at | 2024-03-31 10:32:05.877988+00 |
| updated_at | 2024-04-02 16:54:12.469095+00 |
| description | Helper package for vendoring 'libpng' as a static library with rudimentary FFI bindings. |
| homepage | |
| repository | https://github.com/alambov-md/libpng-rs |
| max_upload_size | |
| id | 1191594 |
| size | 270,166 |
Cargo package for compiling libpng and vendoring it as static library.
Main goal of the package is providing static library for linking with other C code, like versions of Leptonica.
This package provides just rudimentary FFI bindings. More sophisticated bindings would be proveded in separate package. If you need to bind libpng with the Rust code directly, you should write your own bindings.
Compiles and vendors libpng with version 1.6.43 via libpng-src.
Expected to work for:
x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu (no cross-compilation supported yet)x86_64-pc-windows-msvc, aarch644-pc-windows-msvc (no cross-compilation supported yet)x86_64-apple-darwin, aarch64-apple-darwinx86_64-apple-ios, aarch64-apple-ios, aarch64-apple-ios-simTested before upload for all the targets, except aarch64-unknown-linux-gnu and aarch64-pc-windows-msvc.
libpng itself depends on zlib (or libz) C library. The package allows linking with zlib in three different ways which are distinguished by fatures:
link-libz or default feature. Uses zlib-sys package with default features. zlib would look for system-provided version of zlib and link with it dynamically or statically. Usually it's enough, but if your end cargo library is build statically, it may leave zlib unlinked.link-libz-static feature. This feature forces libz-sys crate to link statically in all cases. Covers more use cases, but increases artifact size.--no-default-features with manual zlib / libz linking in Cargo build script or via native tools.See libpng-src.
Rust code and scripts: Alexandr (Alex) Lambov alex.lambov.md@gmail.com, © 2024
libpng - see http://www.libpng.org/pub/png/libpng.html