Skip to content

Build SDKs from source

Use this guide for repository development and unreleased changes. For the published 0.3.1 packages, use the Rust, Node or Python installation guide.

Requirements: Git, Rust 1.92.0 with Cargo, and Node.js 22.13+ with npm or CPython 3.11/3.12 for the corresponding SDK. The checkout pins the Rust toolchain; install it with rustup toolchain install 1.92.0 if needed.

To build the current source checkout:

Terminal window
git clone https://github.com/morehardy/anki-forge.git
cd anki-forge

Rust consumers can use ankiforge = { path = "/absolute/path/to/anki-forge/anki_forge" } in their application manifest. Run examples with cargo run --locked -p ankiforge --example target_api_basic.

Build the Node addon from this checkout:

Terminal window
cd bindings/node
npm run setup
npm run build
npm run pack:local

Install both actual facade and host-native tarballs printed by pack:local into a separate application using npm install --offline --ignore-scripts --omit=optional /absolute/path/facade.tgz /absolute/path/native.tgz. These are source builds, not registry installations. TypeScript configuration is in the Node API.

For Python, activate a CPython 3.11/3.12 virtual environment, install Maturin, then run from the repository root:

Terminal window
python -m pip install maturin==1.15.0
maturin develop --manifest-path bindings/python/native/Cargo.toml --locked

Ordinary installed wheels need no Cargo at runtime. Do not mix source wrappers with older registry native binaries.