A cargo workspace for moid — minimal opaque ID: mint short, opaque identifiers over a configurable alphabet, with an optional NOID-style check character. Mint-only — binding and resolution are deliberately out of scope.
moid/— the library (published to crates.io). Dependency-free core;getrandomis optional behind theos/jsfeatures. Seemoid/README.mdfor the full API and rationale.moid-cli/— a small command-line companion (the installed binary ismoid). Published to crates.io:cargo install moid-cli.moid-ts/— a hand-written TypeScript port (published to npm asmoid). Zero dependencies, ESM, no wasm. Seemoid-ts/README.md.parity/— the harness that keeps the two implementations honest. Never published.
The port is pinned to the crate in both directions, and CI fails on either.
cargo run -p moid-parity records what the crate does into
moid-ts/test/vectors.json, which is committed and which the TypeScript suite
asserts against; npm run vectors:ts mints ids on the TypeScript side that
cargo test -p moid-parity hands back to the crate to re-mint and validate.
Regenerating either artifact must be a no-op — a diff means one side moved
without the other.
Agreement alone would not prove much, so moid-ts/test/reference.test.ts also
checks the port against check characters computed by hand from the prose
definition and against a second naive implementation built on different
primitives. Details in moid-ts/README.md.
$ cargo run -p moid-cli -- mint --seed 42
0hscptb
$ cargo run -p moid-cli -- mint --prefix dx --seed 7 # an ARK-style shoulder
dx0vn4188
$ cargo run -p moid-cli -- validate 0hscptb
valid
$ cargo run -p moid-cli -- alphabets
noid-xdigit radix 29 0123456789bcdfghjkmnpqrstvwxz (default)
betanumeric radix 28 bcdfghjkmnpqrstvwxyz23456789
crockford32 radix 32 0123456789ABCDEFGHJKMNPQRSTVWXYZmint (with --len, --no-check, --prefix, --alphabet/--chars,
--seed, -n), validate, check, and alphabets.
MIT OR Apache-2.0.