How rdkit/rdkit-js works
Project Type and Purpose
• This is an open-source JavaScript/TypeScript library (“@rdkit/rdkit”) that packages a subset of the RDKit C++ core as a WebAssembly (WASM) module and provides a thin JS wrapper.
• It also includes multiple front-end example apps (plain JS, React, Vue, Angular, Next.js) plus Node and TS examples, all demonstrating how to consume the WASM API.
• CI/CD pipelines automate building the WASM, packaging to NPM, publishing new versions, and deploying the example websites.
File-Structure Analysis
Top level:
– “Dockerfile”, “.github/workflows/docker-build.yml”, “azure-pipelines.yml”: container builds & CI scripts
– “scripts/”: shell scripts to compile RDKit → WASM & run CI steps
– “docs/”: static HTML docs/site
– “examples/”: subfolders for each framework (angular, react, vue, nextjs, javascript, node, typescript)
– “package.json”, “.npmignore”, “yarn.lock”: NPM packaging
– “typescript/”: TS definition walkthrough
README Insights
• Scope: NPM builds/releases of core WASM, website deployments of examples, extra utilities atop core.
• Core WASM code lives in upstream RDKit repo; this repo compiles & packages a MinimalLib subset.
• Examples load “dist/RDKit_minimal.js” + “.wasm” via initRDKitModule().