Skip to main content

zfp_rs_ffi/
lib.rs

1//! # zfp-rs-ffi
2//!
3//! C ABI bindings layer around the pure-Rust `zfp-rs` implementation.
4//!
5//! This crate mirrors the API surface of `zfp-sys` (generated from
6//! `#include <zfp.h>`), providing zero-cost FFI adapters that delegate to the
7//! existing `zfp-rs` compression logic.
8//!
9//! All ABI functions export upstream-compatible `zfp_*` and `stream_*` symbol
10//! names, so C consumers can include the generated `zfp.h` and link this crate's
11//! static library in place of the upstream C library.
12//!
13//! ## Scope
14//!
15//! The target API is `zfp-sys` version `0.1.15` as generated in this workspace.
16//! This includes `stream_*` functions except `stream_set_stride` (not enabled
17//! in `zfp-sys`), and excludes CFP APIs and `zfp_block_maximum_size`.
18
19// Missing docs are suppressed during development. The FFI layer also
20// intentionally mirrors C/bindgen names and keeps unsafe pointer operations
21// inside extern shims.
22#![allow(
23    missing_docs,
24    dead_code,
25    unused_unsafe,
26    unsafe_op_in_unsafe_fn,
27    non_upper_case_globals,
28    clippy::missing_safety_doc
29)]
30#![warn(clippy::pedantic)]
31
32mod abi;
33#[path = "bitstream.rs"]
34mod bitstream_api;
35mod block;
36mod field;
37mod header;
38mod promote;
39mod stream;
40mod util;
41
42pub use abi::*;
43pub use bitstream_api::*;
44pub use block::*;
45pub use field::*;
46pub use header::*;
47pub use promote::*;
48pub use stream::*;