Keyboard shortcuts

Press โ† or โ†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

๐ŸŽผ Fugue User Guide

Fugue Logo

A type-safe, monadic probabilistic programming library for Rust โ€” pre-1.0 and actively developed

Write elegant probabilistic programs by composing Model values in direct style; execute them with pluggable interpreters and state-of-the-art inference algorithms.

Rust Crates.io Dev Docs User Docs License: MIT CI codecov Downloads Zotero Discord Ask DeepWiki

Supported Rust: 1.87+ โ€ข Platforms: Linux / macOS / Windows โ€ข Crate: fugue-ppl on crates.io


๐Ÿ‘‹ Welcome

Check out these resources to get started:

About Fugue

  • ๐Ÿงฉ Monadic PPL: Compose probabilistic programs using pure functional abstractions
  • ๐Ÿ”’ Type-Safe Distributions: 17 built-in probability distributions with natural return types
  • ๐Ÿ“Š Multiple Inference Methods: MCMC, HMC, SMC, Variational Inference, ABC (see Advanced Inference)
  • ๐Ÿ” Comprehensive Diagnostics: R-hat convergence, effective sample size, validation
  • โšก Numerically Stable: Log-space computations throughout for robust probability arithmetic
  • โœจ Ergonomic Macros: Do-notation (prob!), vectorization (plate!), addressing (addr!)

๐Ÿงช Where Fugue stands today

Fugue is 0.1.x: pre-1.0, actively developed, with no SemVer stability guarantee yet and a single primary maintainer. It's extensively tested (unit, integration, and statistical regression tests against closed-form posteriors), but that's a different claim from "production-ready" โ€” pin an exact version and expect breaking API changes between 0.1.x releases as the design settles.

Installation

[dependencies]
fugue-ppl = "0.1.0"

๐Ÿ” More Resources