A pure-Rust port of the Mongolian Encoding Converter, with thin bindings for every platform. The core is verified byte-exact against the original Java library on an 11,492-row golden corpus (all five encodings, every direction), so behaviour can't drift across languages.
蒙古文编码转换器的 Rust 版:一处核心,处处复用,且与原 Java 库逐字节对齐。
Zvvnmod (intermediate hub) · Delehi · Menk_Shape · Menk_Letter · Z52 (zcode).
Conversions route through the Zvvnmod hub. (Oyun / Utn57 are recognized but not yet supported.)
meco-core (pure Rust, no deps, #![forbid(unsafe_code)])
translate(from, to, &str) -> Result<String, MecoError>
┌───────────────┬───────────────────┬────────────────────┬─────────────────────┐
meco-wasm meco-uniffi meco-uniffi meco-cabi meco-cabi
(wasm-bindgen) (→ Swift) (→ Kotlin) (C ABI) (C ABI)
web/Node iOS Android PHP-FFI / cgo JNI · Panama
| Platform | Add it | Call |
|---|---|---|
| Rust | meco-core = { path = "crates/meco-core" } |
meco_core::translate(from, to, s)? |
| PHP | composer require zvvnmod/meco |
Meco\Meco::translate(Meco::Z52, Meco::MENK_SHAPE, $s) |
| Web/Node | npm install meco-wasm |
translate("z52", "menk_shape", s) |
| iOS | SwiftPM / pod 'Meco' |
try translate(from: "z52", to: "menk_shape", input: s) |
| Android | implementation("com.zvvnmod:meco-android:…") |
translate("z52", "menk_shape", s) |
USAGE.md — download the prebuilt artifacts from Releases and use them on each platform (C / Go / Python / Dart / Java / Android / Swift / ObjC / Web / PHP), no package-manager account needed. DISTRIBUTION.md — optional registry publishing.
cargo test # 21 unit tests + 11,492-row golden parity vs the Java oracleThe golden corpus (crates/meco-core/tests/golden/golden.tsv) is produced by tools/oracle-java
running the real Java TranslateService; the lookup tables under
crates/meco-core/src/tables/generated/ are dumped from the live Java maps by tools/table-gen.
crates/meco-core— the engine (shape + letter subsystems, hub routing, generated tables)crates/meco-cabi·crates/meco-uniffi·crates/meco-wasm— bindingsbindings/php·bindings/swift·bindings/android— per-ecosystem packagestools/oracle-java·tools/table-gen— the Java oracle + table generator.github/workflows/release.yml— builds & publishes every artifact on avX.Y.Ztag
Apache-2.0 (a port of the Java east-mod/meco).