Skip to main content

cum_rs/
lib.rs

1// Copyright 2026 Mahmoud Harmouch.
2//
3// Licensed under the MIT license
4// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
5// option. This file may not be copied, modified, or distributed
6// except according to those terms.
7
8#![cfg_attr(docsrs, feature(doc_cfg))]
9#![doc(
10    html_favicon_url = "https://raw.githubusercontent.com/wiseaidotdev/cum/main/assets/favicon.png",
11    html_logo_url = "https://raw.githubusercontent.com/wiseaidotdev/cum/main/assets/logo.webp"
12)]
13#![doc = include_str!("../README.md")]
14
15//! # `cum-rs`: Claude Unmarking Machine
16//!
17//! A multilanguage watermark removal crate for AI-generated content. The core
18//! is pure Rust; Python, Node.js, and WASM bindings are built via Cargo
19//! feature flags.
20
21pub mod cleaner;
22pub mod container_meta;
23pub mod error;
24pub mod image_meta;
25pub mod stochastic;
26pub mod types;
27pub mod unicode;
28
29#[cfg(all(feature = "wasm", target_arch = "wasm32"))]
30pub mod wasm;
31
32#[cfg(all(feature = "python", not(feature = "rust-binary")))]
33pub mod python;
34
35#[cfg(all(feature = "node", not(feature = "rust-binary")))]
36pub mod node;
37
38#[cfg(feature = "cli")]
39pub mod cli;
40
41#[cfg(all(feature = "python", not(feature = "rust-binary")))]
42use pyo3::prelude::*;
43
44#[cfg(all(feature = "python", not(feature = "rust-binary")))]
45#[pymodule(name = "cum_rs")]
46fn cum_rs(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {
47    m.add("__version__", env!("CARGO_PKG_VERSION"))?;
48    crate::python::register_python_module(py, m)?;
49    Ok(())
50}