Skip to content

Rust API (rustdoc)

The npm package is a thin binding layer over the runjucks_core crate in native/crates/runjucks-core/. Most users only need the Node.js API and the JavaScript API guide.

PieceRole
runjucks_coreTemplate engine: lexer, parser, AST, renderer, environment, filters
runjucks-napiNode native addon that exposes the JavaScript API
native/fixtures/Conformance and test data

Expression parsing, tag parsing, and built-in filters live inside runjucks_core. Use rustdoc (below) for module-level detail rather than duplicating it in the Starlight guides.

Each docs build runs cargo doc on runjucks_core and copies the HTML into /rustdoc/ (under your base path if you use one for GitHub Pages). The crate root is:

/rustdoc/runjucks_core/ (e.g. https://<owner>.github.io/<repo>/rustdoc/runjucks_core/ for a project site).

Use the sidebar link Rust crate (rustdoc) to open it.

From the repository root (runjucks/):

Terminal window
cargo doc --manifest-path native/Cargo.toml --no-deps -p runjucks_core --open

This documents the runjucks_core package only (--no-deps). All engine modules are public in that crate.

If runjucks_core is published to crates.io, documentation will appear at https://docs.rs/runjucks_core automatically. Until then, use the hosted rustdoc on this site or local cargo doc as above.