Ruby
asciichemasciichemasciichemasciichemnpm install asciichemPublished to npm via trusted publishing (OIDC, no stored credentials) with SLSA provenance attestations — see the provenance on npm.
import { parse, parseSmiles, parseMolfile, renderMathml } from "asciichem";
// The same model as every runtime — the authoritative one is the// Rust crate; the corpus keeps this package identical to it.parse("2H_2 + O_2 ->[heat] 2H_2O").toText();
parse("C1-C-C-C-C-C1").toStructuralSvg(); // cyclohexane hexagon
// Structures from databases, straight into the modelconst aspirin = parseSmiles("CC(=O)OC1=CC=CC=C1C(=O)O");aspirin.toStructuralSvg();aspirin.toSmiles(); // deterministic writer — round-trips exactly
parseMolfile(v2000Text); // coordinates preserved for rendering
// MathML goldens — byte-identical with the reference implementation.console.log(renderMathml(parse("^14C")));Parse / reject · L0 emission · L1 text · L2 MathML · L2 SVG (typographic + structural, deterministic) · L3 stereo (parity-correct canonical SMILES) · SMILES · molfile — 100% of the shared corpus. The CML and linter layers, and the resolver/citation ports, are not yet claimed (asciichem-ts#26 converges them from the Rust contract). See the Implementations matrix for the full table.
This is the package that powers this site’s live renderer and every diagram on this page. Highlights:
import.github.com/asciichem/asciichem-ts — powers this page.