Expand description
cargo xtask setup-native — build MuPDF and the C wrapper for native dev.
- Downloads MuPDF sources if the required version is not already present.
- Builds the
mupdf_wrapperC library. - Compiles MuPDF using system libraries.
- Creates symlinks in
target/mupdf_wrapper/<platform>/so the Rust build script can find the static libraries.
§Required MuPDF version
The version is pinned to REQUIRED_MUPDF_VERSION. If the sources
already present on disk match this version the download is skipped.
Structs§
- Setup
Native Args - Arguments for
cargo xtask setup-native.
Constants§
- NATIVE_
BUILT_ 🔒MARKER - Marker file written after a successful native MuPDF build.
- REQUIRED_
MUPDF_ VERSION - The MuPDF source version that must be present for a successful build.
Functions§
- build_
mupdf_ 🔒native - Compiles MuPDF using system libraries for the native platform.
- build_
mupdf_ 🔒wrapper_ native_ if_ needed - Builds the
mupdf_wrapperC static library for the native platform. - collect_
system_ 🔒cflags - Collects system library CFLAGS via
pkg-configon macOS. - ensure_
mupdf_ sources - Ensures MuPDF sources at the required version are present in
thirdparty/mupdf/. - link_
mupdf_ 🔒artifacts - Creates symlinks in
target/mupdf_wrapper/<platform>/pointing to the compiled MuPDF static libraries. - native_
mupdf_ 🔒ready - Returns
truewhen native MuPDF libraries are present and marked as built. - read_
mupdf_ 🔒version - Reads the MuPDF version string from the version header file.
- run
- Builds MuPDF and the C wrapper for native (non-cross-compiled) development.
- symlink_
force 🔒 - Creates a symlink at
linkpointing totarget, removing any existing file or symlink atlinkfirst. - write_
native_ 🔒build_ marker - Writes the native build marker in the MuPDF source directory.