Skip to main content

qssm_core/
lib.rs

1#![forbid(unsafe_code)]
2//! # QSSM Core — Proving Engine
3//!
4//! The canonical Rust + WASM package for the QSSM truth engine.
5//! Re-exports the 5 façade functions from `qssm-api` and provides
6//! `#[wasm_bindgen]` bindings so browsers and JS runtimes can call them.
7//!
8//! ## Rust usage
9//!
10//! ```no_run
11//! use qssm_core::{compile, commit, prove, verify, open};
12//!
13//! let blueprint = compile("age-gate-21").unwrap();
14//! let commitment = commit(b"my-secret", &[1u8; 32]);
15//! let claim = br#"{"claim":{"age_years":25}}"#;
16//! let proof = prove(claim, &[1u8; 32], &blueprint).unwrap();
17//! assert!(verify(&proof, &blueprint));
18//! assert_eq!(open(b"my-secret", &[1u8; 32]), commitment);
19//! ```
20
21// ── Re-export the native Rust API ────────────────────────────────────
22
23pub use qssm_api::{commit, compile, open, prove, verify};
24
25// ── WASM bindings ────────────────────────────────────────────────────
26
27mod wasm;