meco_core/lib.rs
1#![forbid(unsafe_code)]
2// TODO(remove before binding stage): silence dead_code while the spine is wired up incrementally.
3// Every item is exercised by unit tests; once the router/translators consume them this comes off.
4#![allow(dead_code)]
5//! # meco-core
6//!
7//! Pure-Rust core of the Mongolian Encoding Converter (`meco`), ported from the
8//! original Java library `com.zvvnmod.meco`.
9//!
10//! Design & decisions: `docs/superpowers/specs/2026-06-18-meco-rust-port-design.md`.
11//!
12//! Ground rules baked into this crate:
13//! - Generated Java tables are the historical behavior baseline; Rust-owned Zvvnmod rules may
14//! intentionally override them when the project adopts corrected semantics.
15//! - Conversions route through the intermediate **Zvvnmod** encoding.
16//! - The build has no I/O or framework and is pure compute on every platform, including
17//! `wasm32-unknown-unknown`. UTN #57 target conversion is linked in through the pure-Rust
18//! `zvvnmod-utn57` crate; no external command or interpreter is started.
19//!
20//! Status: scaffolding — the shared spine (encoding types, errors, string helpers) is in place.
21//! Translation routing and the shape/letter subsystems are added in later steps.
22
23mod code_mapper;
24mod code_type;
25mod dispatch;
26mod error;
27mod letter;
28mod router;
29mod shape;
30mod strings;
31mod tables;
32mod unicode;
33mod word;
34
35pub use code_type::{CodeSeries, CodeType};
36pub use error::MecoError;
37pub use router::translate;
38
39/// Crate version (currently just the Cargo package version). A table-provenance tag
40/// (the Java commit the generated tables come from) will be appended once tables exist.
41pub fn version() -> &'static str {
42 env!("CARGO_PKG_VERSION")
43}