Expand description
§solid-pod-rs-forge
A clean-room Rust reimplementation of the JavaScriptSolidServer
forge plugin — a zero-build, server-rendered Git forge (a
Gogs/Gitea slice) composed almost entirely from primitives
solid-pod-rs already ships: git smart-HTTP
(solid_pod_rs_git), write-as-commit provenance and Bitcoin
anchoring (solid_pod_rs::provenance, solid_pod_rs::mrc20),
NIP-98 auth (solid_pod_rs::auth::nip98), did:nostr identity
(solid_pod_rs::did_nostr_types), and WAC gating (enforced by the
embedding server before ForgeService::handle is reached).
§IP posture
Everything here is derived from the forge plugin’s published
behaviour and expressed as fresh Rust on solid-pod-rs’s own
primitives. JSS is cited by function/section name only — no upstream
JavaScript is transcribed. This mirrors how [solid_pod_rs::bitcoin_tx]
and solid_pod_rs::auth::nip98 cite JSS while carrying an
independent implementation.
§Architecture rule — “words in pods, metadata in the forge”
Issue/PR/comment bodies live in the author’s own pod (WAC-governed,
author-owned); the forge keeps only a spine index of pointers.
Bodies are re-fetched at read time, bounded. Podless did:nostr
agents store bodies in forge-hosted storage instead.
§Native-only
The forge shells to git/git-http-backend, touches the
filesystem, and runs a loopback HTTP client. It is never part of a
core/wasm build and adds zero dependencies to the core crate.
§Entry point
The crate is framework-agnostic: ForgeService::handle consumes a
ForgeRequest and produces a ForgeResponse; the embedding
server (actix/axum/hyper) translates its native types at the edge and
WAC-gates the forge scope before dispatch — exactly as the server’s
handle_git gates before invoking solid_pod_rs_git::GitHttpService.
Re-exports§
pub use bodies::HostedReader;pub use bodies::LoopbackFetch;pub use config::ForgeConfig;pub use error::ForgeError;pub use hosted::HostedStore;pub use ownership::ForgeAgent;pub use request::esc;pub use request::ForgeRequest;pub use request::ForgeResponse;pub use router::parse_route;pub use router::Route;pub use spine::FsSpineStore;pub use spine::SpineStore;pub use token::TokenError;
Modules§
- auth
- Caller-identity resolution for forge requests.
- bodies
- Two-phase pod-write coordinator.
- config
- Forge configuration and the chain/mainnet policy guard.
- error
- Typed error enum with HTTP status mapping, mirroring the shape of
solid_pod_rs_git::error::GitError. - hosted
- Forge-hosted body storage for podless
did:nostragents. - html
- Server-rendered HTML views — zero framework, inline CSS, every
interpolation passed through
crate::request::esc. - ownership
- Caller identity + repository-owner resolution and the namespace-write guard.
- prelude
- Convenience import surface.
- repo
- Repository materialisation and filesystem layout.
- request
- Binder-agnostic request/response types plus the XSS-neutralisation spine.
- router
- Pure route dispatch — maps
(method, path)to aRoute. - spine
- The spine — the forge’s only durable non-git metadata.
- token
- Forge push token — a macaroon-lite HMAC bearer.
Structs§
- Forge
Service - The forge service. One instance is built at server startup and shared
(
Arc) across requests. All durable state lives underplugin_dir.