mars-server
Registry HTTP server, authorization, durable storage, query planning, federation, and anchor outbox.
Registry HTTP server, authorization, durable storage, query planning, federation, and anchor outbox.
Use this crate to operate or embed the reference registry. The public router and store interfaces are implementation APIs, not guarantees of an already available hosted service.
Package contract
Workspace version: 0.1.0. Rust edition 2021, minimum declared toolchain 1.81, Apache-2.0 license. Protocol wire version stays 1.0.0.
Use the source checkout as the installation authority; package registry publication is not verified by this documentation build. In a consumer Cargo manifest, use an explicit path dependency to your checked-out crate.
[dependencies]
mars-server = { path = "../mars/mars-server" }Feature flags
| Feature | Enables |
|---|---|
default | postgres, sigil |
contracts | mars-protocol/contracts, mars-protocol/sigil, dep:utoipa |
sigil | mars-protocol/sigil, dep:sigil-sdk |
sharding | dep:mars-shard, mars-protocol/sharding |
postgres | dep:sqlx-core, dep:sqlx-postgres |
prod | mars-protocol/prod |
test-anchor | Marker feature |
Public root modules
anchor, api, auth, bond, config, contracts, discovery, error, federation, middleware, observability, production, search, store, validation. Conditional availability follows the source attributes.
Public module reference
| Module | Source |
|---|---|
| crate | mars-server/src/lib.rs |
| anchor | mars-server/src/anchor/mod.rs |
| anchor::config | mars-server/src/anchor/config.rs |
| anchor::sigil | mars-server/src/anchor/sigil.rs |
| anchor::test_adapter | mars-server/src/anchor/test_adapter.rs |
| api | mars-server/src/api/mod.rs |
| api::rest | mars-server/src/api/rest.rs |
| api::websocket | mars-server/src/api/websocket.rs |
| auth | mars-server/src/auth/mod.rs |
| auth::adapters | mars-server/src/auth/adapters/mod.rs |
| auth::adapters::siws | mars-server/src/auth/adapters/siws.rs |
| auth::challenge_store | mars-server/src/auth/challenge_store.rs |
| auth::handlers | mars-server/src/auth/handlers.rs |
| auth::principal | mars-server/src/auth/principal.rs |
| auth::registry | mars-server/src/auth/registry.rs |
| auth::session_store | mars-server/src/auth/session_store.rs |
| bond | mars-server/src/bond.rs |
| config | mars-server/src/config.rs |
| contracts | mars-server/src/contracts.rs |
| discovery | mars-server/src/discovery/mod.rs |
| error | mars-server/src/error.rs |
| federation | mars-server/src/federation/mod.rs |
| federation::discovery | mars-server/src/federation/discovery.rs |
| federation::envelope | mars-server/src/federation/envelope.rs |
| federation::policy | mars-server/src/federation/policy.rs |
| federation::service | mars-server/src/federation/service.rs |
| federation::transport | mars-server/src/federation/transport.rs |
| federation::worker | mars-server/src/federation/worker.rs |
| middleware | mars-server/src/middleware/mod.rs |
| middleware::auth | mars-server/src/middleware/auth.rs |
| observability | mars-server/src/observability/mod.rs |
| production | mars-server/src/production.rs |
| search | mars-server/src/search.rs |
| store | mars-server/src/store/mod.rs |
| store::memory | mars-server/src/store/memory.rs |
| store::postgres | mars-server/src/store/postgres.rs |
| store::sharded_memory | mars-server/src/store/sharded_memory.rs |
| validation | mars-server/src/validation/mod.rs |
| validation::resolver | mars-server/src/validation/resolver.rs |
API documentation boundary
The linked pages contain syntax-derived public declarations, method signatures, and documentation comments. They omit function bodies and constant values, and skip test-only modules. Compiler-resolved re-exports, trait resolution, and target availability require Rustdoc with the selected feature profile; no backend build or conformance tests ran here.
Three actual binaries cover server startup, contract generation/checks, and ledger verification. Production rejects mock/test anchor combinations.