postrust_engine/lib.rs
1//! The REST request pipeline of [Postrust](https://postrust.org/): an HTTP
2//! request in, the response the PostgREST-dialect API gives it out.
3//!
4//! No web framework is involved. The server (`postrust-server`) wraps this in
5//! axum, and the Lambda adapter reaches it through the server. It is meant to
6//! be shared with a host that cannot run axum -- a Cloudflare Worker -- too,
7//! once the database interface is driver-neutral; it does not build for wasm32
8//! yet, since it still talks to PostgreSQL through sqlx. See issue #50.
9//!
10//! ```text
11//! let response = postrust_engine::handle(&state, request).await;
12//! ```
13
14#![warn(missing_docs)]
15#![allow(clippy::result_large_err)]
16
17mod handler;
18mod state;
19
20pub use handler::{allow, error_response, handle};
21pub use state::State;