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

specification-core Guide

specification-core is an idiomatic Rust implementation of the Specification Pattern. Release 0.1.0 provides a synchronous core, explicit dynamic and thread-sharing boundaries, typed decisions, immutable evaluation context, deterministic time rules, a runtime-neutral async layer, and opt-in serde and macro crates.

This book is the reader-facing guide. The generated API reference contains complete signatures and item-level rustdoc. The same crates are also available on docs.rs.

Start here

What is in 0.1.0

The released API includes boolean composition, AllOf/AnyOf, BoxedSpecification, SharedSpecification, FirstMatch, EvaluationContext, MaxCount, Flag, Cooldown, AsyncSpecification, RuleDocument, and the #[specification(Name)] predicate macro.

Date-range rules, segment providers, property wrappers, Combine observation, and global context providers are intentionally outside the Rust 0.1.0 scope. Use ordinary closures or application-owned adapters for domain-specific rules.

Documentation surfaces

  • This book explains concepts, workflows, design trade-offs, and Swift migration.
  • rustdoc/docs.rs is the authoritative API reference and compiles focused examples as doctests.
  • Cargo examples and integration tests are the executable end-to-end scenarios linked from the relevant chapters.