Skip to content

Rust API

The numerics live in the Rust core crate, libitofin. Its API reference is generated by rustdoc and published automatically on every crates.io release:

[:material-book-open-variant: **docs.rs/libitofin** :material-arrow-right:](https://docs.rs/libitofin){ .md-button .md-button--primary }

Why the Rust docs are hosted separately

  • rustdoc is the native tool. Rust API docs come from the /// doc comments on the source and render with full type links, trait implementations and source view. docs.rs builds them for you on publish, so there is nothing to duplicate here.
  • This site is the Python surface. It renders the hand-written .pyi stubs (see the Python API section). Keeping the two apart avoids one language's docs going stale against the other's toolchain.

Add it to a Rust project

cargo add libitofin
use libitofin::time::Date;
use libitofin::settings::Settings;
// analytic option engines, curves and CDS pricing are available today - see docs.rs.

Runnable Rust examples live in crates/libitofin/examples; their Python counterparts are on the Getting started page.