Skip to main content

webp/
lib.rs

1//! A mechanical Rust port of libwebp v1.6.0, the WebP reference implementation.
2//!
3//! The modules mirror the upstream source tree: one module per upstream C file,
4//! with the same name, and translated functions carry `// upstream:` references
5//! to the C function they translate. See `docs/PORTING.md` for the porting
6//! contract; a module that holds only its provenance header has not been
7//! ported yet, and each module's documentation names its deviations from
8//! upstream.
9//!
10//! Ordinary builds compile and link no C. The C ABI export in [`abi`] is the
11//! only module that may contain `unsafe` code (ADR 0004 and ADR 0005). The safe
12//! Rust API in [`api`] wraps the translation for Rust callers (ADR 0006).
13
14#![deny(unsafe_code)]
15#![warn(clippy::all, clippy::pedantic)]
16
17pub mod api;
18pub mod dec;
19pub mod demux;
20pub mod dsp;
21pub mod enc;
22pub mod mux;
23pub mod sharpyuv;
24pub mod utils;
25pub mod webp;
26
27#[allow(
28    unsafe_code,
29    reason = "ADR 0004: the C ABI export is the only unsafe module"
30)]
31pub mod abi;