sim_table_http/lib.rs
1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! HTTP-backed table directory backend for SIM.
4//!
5//! `HttpDir` treats each table key as a resource below a configured base URL.
6//! Keys are percent-encoded as one URL path segment. Reads perform bounded `GET`
7//! requests, writes perform bounded `PUT` or `POST` requests, and deletes
8//! perform bounded `DELETE` requests. Directory traversal methods return an
9//! unsupported error unless an indexed HTTP resource is added by a caller.
10//! Every effectful operation requires the canonical `net/http` capability, with
11//! the compatibility aliases accepted by `sim-table-core`.
12
13mod capabilities;
14mod citizen;
15mod http_dir;
16mod options;
17mod transport;
18
19pub use capabilities::{require_table_http, table_http_capability};
20pub use citizen::{HttpDirDescriptor, http_dir_class_symbol};
21pub use http_dir::{HttpDir, install_http_dir_lib};
22pub use options::{HttpDirOptions, HttpWriteMethod};
23
24/// Cookbook recipes for this lib, embedded at build time.
25pub static RECIPES: sim_cookbook::EmbeddedDir =
26 include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
27
28#[cfg(test)]
29mod tests;