Skip to main content

marque_ism/
lib.rs

1// SPDX-FileCopyrightText: 2026 Knitli Inc.
2//
3// SPDX-License-Identifier: LicenseRef-MarqueLicense-1.0
4
5#![deny(unsafe_code)]
6#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
7
8//! marque-ism — ISM vocabulary types, generated CVE enums, and core spans.
9//!
10//! This crate is the leaf dependency in the marque workspace. It owns:
11//! - `Span` and scanner candidate types (zero-copy position tracking)
12//! - `IsmAttributes` (the canonical parsed marking representation)
13//! - `TokenSet` trait and `CapcoTokenSet` (Aho-Corasick CVE token matching)
14//! - Generated code from ODNI ISM schemas (CVE enums, validators, migrations)
15//!
16//! **WASM-safe**: no I/O, no format dependencies, no platform-specific code.
17
18pub mod attrs;
19pub mod date;
20pub mod generated;
21pub mod marking_forms;
22pub mod page_context;
23pub mod span;
24pub mod token_set;
25
26// Re-export primary types at crate root for convenience.
27pub use attrs::{
28    AeaMarking, Classification, CountryCode, DeclassExemption, DissemControl, FgiClassification,
29    FgiMarker, ForeignClassification, FrdBlock, IsmAttributes, JointClassification,
30    MarkingClassification, NatoClassification, NatoLevel, NonIcDissem, RdBlock, SarCompartment,
31    SarIndicator, SarMarking, SarProgram, SciCompartment, SciControl, SciControlBare,
32    SciControlSystem, SciMarking, TokenKind, TokenSpan,
33};
34pub use date::{ApproxIsmDate, ApproxQualifier, IsmDate, ParseIsmDateError, UtcOffset};
35pub use generated::values::{
36    ISMCAT_TETRA_VERSION, SCHEMA_VERSION, TETRAGRAPH_MEMBERS, TRIGRAPHS, TetragraphProvenance,
37    is_bare_cve_value, is_decomposable, lookup_tetragraph_members, lookup_tetragraph_provenance,
38};
39pub use page_context::{PageContext, sar_sort_key};
40pub use span::{DocumentPosition, MarkingCandidate, MarkingType, Span, Zone};
41pub use token_set::{CapcoTokenSet, TokenSet};