Crates.io | lcms2-sys |
lib.rs | lcms2-sys |
version | 4.0.5 |
source | src |
created_at | 2016-07-14 09:43:11.141623 |
updated_at | 2024-02-27 00:07:41.641765 |
description | Bindings for liblcms2 (Little CMS) with support for Linux, macOS, and Windows. See lcms2 crate for a safe Rust wrapper. |
homepage | https://lib.rs/crates/lcms2-sys |
repository | https://github.com/kornelski/rust-lcms2-sys.git |
max_upload_size | |
id | 5664 |
size | 1,444,246 |
Makes LCMS C API available in Rust. There's also a higher-level wrapper.
It's up to date with version 2.16, and works with older versions too. Linux, macOS and Windows are supported. Other platforms may work, too.
The crate requires Rust 1.65 or later.
This crate improves bindgen's bindings to be a bit more Rust-friendly:
cms
prefix, e.g. cmsColorSpace
is ColorSpace
.
fn cmsReadTag()
).cmsSig
prefix, e.g. cmsSigLabData
is LabData
.Intent::Perceptual
enum instead of INTENT_PERCEPTUAL
integer.If LCMS2_LIB_DIR
environmental variable is set, and the path contains either a static or dynamic library, this libary will be used regardless of other settings.
If LCMS2_STATIC
environmental variable is set, it will prefer static linking instead.
The package supports "static" and "dynamic" Cargo features. If "dynamic" is enabled (the default) then it will link to system-wide LCMS2 shared library if pkg-config
is installed and working correctly. Typically you will also need a lcms2-dev
or similar package installed on the system.
If pkg-config
doesn't work (e.g. on Windows), or the "static" feature is enabled, it will build bundled LCMS 2.15 from source instead.
For Rust build scripts using this sys crate as a dependency, Cargo will set DEP_LCMS2_INCLUDE
env var to joined paths of include dirs where lcms2.h
may be found. This is only relevant if you compile C code using the library directly.
This repo uses git submodules, which can be annoying. Make sure you clone with git clone --recursive
, or run:
git submodule update --init