Installation
Python
Install from PyPI — no RDKit or any C/C++ dependency required:
Requires Python 3.8+ (requires-python = ">=3.8" in pyproject.toml). Pre-built
wheels are published for common combinations of Linux/macOS (Apple Silicon)/Windows
and recent CPython versions — see the live, authoritative list of built wheels
on the PyPI files page. If no wheel
matches your platform, pip will attempt to build from source (requires a Rust
toolchain — see Building from Source below).
Rust
Add to Cargo.toml:
Or use cargo add:
JavaScript (npm)
Or with yarn/pnpm:
The npm package is currently built with wasm-pack build --target web.
Supported:
- Native browser ES modules
- Vite
- Webpack
- Rollup and compatible bundlers
Not currently supported:
- Plain Node.js
require() - Direct Node.js execution without a bundler
See the WASM API reference for usage examples, and a from-source build path for plain Node.js use.
WebAssembly (browser)
The WASM module is bundled with the npm package. For direct browser use without npm:
<script type="module">
import init, { find_routes } from 'https://unpkg.com/renkin@latest/renkin.js';
await init('https://unpkg.com/renkin@latest/renkin_bg.wasm');
const result = JSON.parse(find_routes("CC(=O)Oc1ccccc1C(=O)O", 5, 3, 0));
console.log(result);
</script>
Building from Source
Requires Rust 1.85+ (stable) — RENKIN uses edition = "2024", which requires this floor:
For Python wheels (requires maturin):
For WASM (requires wasm-pack):