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. A local preview can serve the generated reference here after it is built:

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. Static Cloudflare deploys do not currently build or publish this generated directory, so use source docs or build it locally when the link is absent.

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.