tact_memory/server/mod.rs
1//! Reusable authenticated server for shared Tact memory.
2//!
3//! [MemoryServer] authenticates each request before binding its namespace to a concrete
4//! [crate::MemoryStore]. It owns HTTP parsing, authorization, stable protocol errors, tracing,
5//! request timeouts, and concurrency limits. Backend implementations own durable transactions,
6//! indexing, capacity, telemetry, and stable export pagination.
7//!
8//! Production deployments can bind PlanetScale, Cloudflare, PostgreSQL, or another store through
9//! the same [crate::MemoryStore] contract. The workspace's `tact-memory-cloudflare` package
10//! demonstrates a Cloudflare Worker backed by D1.
11
12#[cfg(feature = "server")]
13mod credential;
14pub mod protocol;
15#[cfg(feature = "server")]
16mod router;
17
18#[cfg(feature = "server")]
19pub use credential::{Credential, CredentialError};
20#[cfg(test)]
21pub(crate) use router::MAX_JSON_BODY_BYTES;
22#[cfg(feature = "server")]
23pub use router::{MemoryServer, ServerBuildError};
24
25#[cfg(all(test, feature = "server"))]
26mod tests;