chematic for Rust
chematic is a pure-Rust cheminformatics crate for parsing molecules, computing descriptors, and generating fingerprints and 2D depictions — usable directly in a Rust server, command-line tool, or embedded/edge context, with no FFI and no C++ toolchain to install for the default feature set. It ships as a Cargo workspace of focused crates —chematic-fp for fingerprints, chematic-wasm for the WebAssembly bindings, and about twenty more, all built on the same core.
cargo add chematic --features "smiles,perception,chem,3d,fp"Features gate functionality: the command above enables smiles, perception,chem, 3d, and fp. Turn on only what you need, or add more as your use case grows. See the API reference on docs.rsfor the full feature list.
Pure Rust, with one named exception
Pure Rust by default. The optional native-inchi feature vendors the IUPAC InChI C reference implementation for bit-exact standard InChI output. It is opt-in and isolated to the chematic-inchi crate.
That qualification matters for the crate as a whole, too: chematic-mcp is #![forbid(unsafe_code)]. The library as a whole is not: the default depict feature (shipped in both the pip and npm packages) pulls in resvg/rustybuzz/tiny-skia for 2D rendering, which contain unsafe code.chematic does not claim to be free of unsafe code — only that the core parsing and chemistry logic avoids it by default, with the exception named above.
What it's for
- Chemistry logic embedded directly in a Rust web service or job worker — no subprocess, no separate chemistry microservice.
- Command-line tools that parse, filter, or annotate molecular data.
- The same crate also compiles to WebAssembly (see chematic for the browser) and powers chematic-mcp, chematic's Model Context Protocol server.
Where to go next
- docs.rs/chematic — generated API reference.
- Documentation site — installation guide, cookbook, and use-case walkthroughs.
- Validation — feature maturity, known limitations, and benchmark methodology.
- Source on GitHub — workspace layout, crate READMEs, and the changelog.