Skip to main content

rnp_src/
lib.rs

1//! rnp-src: compile librnp and all dependencies from source.
2//!
3//! Consumed by `rnp-rs` when the `vendored` Cargo feature is enabled.
4//! The build script (`../build.rs`) downloads and compiles:
5//!
6//! - librnp 0.18.1 (OpenPGP implementation)
7//! - json-c 0.17 (JSON parsing, required by librnp)
8//! - zlib 1.3.1 (compression)
9//! - bzip2 1.0.8 (compression, with bz_internal_error fix)
10//!
11//! Botan is provided by the [`botan-src`] crate dependency.
12//!
13//! Paths are communicated to `rnp-rs`'s build.rs via Cargo's `links`
14//! mechanism (DEP_RNP_LIB_DIR, DEP_RNP_INCLUDE_DIR, DEP_RNP_<NAME>_LIB_DIR).
15//!
16//! Pure-logic types and constants live in [`links`] so they can be shared
17//! with the build script (via `#[path]`) and unit-tested here without
18//! invoking the C/C++ toolchain.
19
20pub mod links;
21
22pub use links::{CmakeDep, Deps, JSON_C, ZLIB, lib_dir_env_var};
23
24/// librnp version this crate compiles.
25pub const RNP_VERSION: &str = "0.18.1";