sorrel/docs/api

API reference

Generated straight from the doc comments in the source with rustdoc — the reference cannot drift from the code because it is the code.

Engine (Rust)

The engine crate is documented inline (/// and //! comments on every public module, type, and function). The deployed site serves the generated reference here:

Building this page's target locally: run scripts/build-api-docs.sh from a checkout that has sorrel-core as a sibling directory (the root monorepo layout). It runs cargo doc --no-deps and copies the output into api/, which is gitignored — generated content never gets committed, it is built fresh by CI on every deploy.

Where the docs come from

Rust has documentation generation built into the toolchain: rustdoc turns doc comments into a fully cross-referenced, searchable site, and cargo test even compiles the code examples inside comments so samples cannot rot. No extra dependencies are needed, which fits Sorrel's zero-dependency discipline.

# anywhere, from the sorrel-core checkout
cargo doc --no-deps --open

Node modules

The JS modules (sorrel-hub, sorrel-vault, sorrel-protocol, ...) are documented with JSDoc-style comments in the source and README/API sections per repo. A generated HTML reference for them (via TypeDoc or JSDoc) is planned once the SDK surface stabilizes — the protocol schemas themselves are already the machine-readable contract and live in sorrel-protocol.