boatramp_node/lib.rs
1//! Node assembly for boatramp.
2//!
3//! The `boatramp` binary was historically the only place that turned parsed
4//! configuration into a running node (store + backends + handler runtime +
5//! reconcile loops + router). That assembly is not reachable as a library, so an
6//! embedder — or an in-process fidelity test — can't exercise the same wiring the
7//! `boatramp serve` binary runs (see `PLAN-node-library`).
8//!
9//! This crate is the extraction target. It starts with the parsed **config model**
10//! ([`config`]) and grows, incrementally and behaviour-preservingly, to host the
11//! `assemble(config) -> RunningNode` path. The binary re-exports [`config`] under
12//! its own `crate::config`, so moving the module here changes no call site.
13//!
14//! It depends on the concrete backend crates (Docker, storage, …) that
15//! `boatramp-server` deliberately does not, keeping `boatramp-server` a
16//! backend-agnostic library while this crate is the batteries-included assembler.
17
18pub mod auth;
19pub mod backends;
20/// The `BLOB FALLBACK ZERO-GAP OK` mutation-verified gate (blob-backend migration Part 2). Compiled
21/// ONLY under the `blob-fallback-gate-mutation` feature (the CI gate lane): it drives the real
22/// [`FallbackStorage`](boatramp_storage::FallbackStorage) composite over real `FsStorage` tempdir
23/// backends + a real `DeployStore` for the GC-refusal invariant, and prints the marker only on a
24/// clean run.
25#[cfg(feature = "blob-fallback-gate-mutation")]
26pub mod blob_fallback;
27/// Offline, node-local blob-backend migration (`boatramp blob migrate`) — the copy engine over
28/// the [`Storage`](boatramp_core::Storage) primitives.
29pub mod blob_migrate;
30pub mod blobs;
31pub mod compute;
32pub mod config;
33pub mod error;
34pub use error::Error;
35pub mod handlers;
36// The managed-SQL module carries the Postgres/MySQL operator-SQL + credential machinery (sqlx) AND
37// the migration substrate. It compiles whenever a sqlx engine OR `migrate` (⇒ the embedded libsql
38// migration runner) is on, so the libsql migrate parity is reachable on a node with no external sqlx
39// engine. The sqlx-specific items inside the module stay gated on the sqlx features.
40#[cfg(any(feature = "sql-postgres", feature = "sql-mysql", feature = "migrate"))]
41pub mod managed_sql;
42// The project-scoped declarative managed-database front door (#501 Stage B): lowering
43// + the two-source merge point + the `ManagedDbDeclare` capability. Needs a sqlx engine
44// (it provisions a Postgres/MySQL managed DB).
45#[cfg(any(feature = "sql-postgres", feature = "sql-mysql"))]
46pub mod managed_db_declare;
47pub mod node;
48#[cfg(any(feature = "sql-postgres", feature = "sql-mysql"))]
49pub mod repair;
50/// Node-level base S3 credential sourcing from the `[secrets]` sealed store (#505).
51pub mod s3_credential;
52#[cfg(any(feature = "sql-postgres", feature = "sql-mysql"))]
53pub mod tenant_sql;
54#[cfg(any(feature = "sql-postgres", feature = "sql-mysql"))]
55pub mod tenant_tombstone;
56pub use node::{NodeInput, RunningNode, assemble};