fastapi-core 0.2.0

Core types and traits for the FastAPI Rust framework
Documentation

Core types and traits for fastapi_rust.

This crate provides the fundamental building blocks:

  • [Request] and [Response] types
  • [RequestContext] wrapping asupersync's Cx
  • [FromRequest] trait for extractors
  • Error types and [IntoResponse] trait

Design Principles

  • Zero-copy where possible
  • No runtime reflection
  • All types support Send + Sync
  • Cancel-correct via asupersync integration

Asupersync Integration

This crate uses asupersync as its async runtime foundation, providing:

  • Structured concurrency: Request handlers run in regions
  • Cancel-correctness: Graceful cancellation via checkpoints
  • Budgeted timeouts: Request timeouts via budget exhaustion
  • Deterministic testing: Lab runtime for reproducible tests