Currently, feder-server is tightly coupled with Axum, a web framework. The goal of this issue is to make the server framework-agnostic so that Axum becomes only one possible adapter.
Requirments
-
Remove Axum dependencies from feder-server
feder-server must not depend on axum::Router, Axum request/response types, extractors, IntoResponse, or other Axum-specific APIs.
- Axum-specific integration should move into a separate adapter such as
feder-axum.
-
Introduce a reusable HTTP boundary
- Shared HTTP request/response types and ActivityPub-over-HTTP behaviour should live in
feder-http.
feder-server should consume and produce these HTTP types rather than Axum-specific ones.
- Prefer standard
http crate types where practical.
-
Make feder-server Tower-compatible
- Tower should only define the request/response processing contract; it should not dictate the request and response types themselves.
feder-server should expose a tower_service::Service interface.
Service<FederRequest, Response = FederResponse>
-
Move Axum integration into feder-axum
feder-axum should handle routing, extractors, Axum body conversion, and conversion between Axum and feder-http.
- Applications should be able to combine
feder-server with feder-axum explicitly.
application
↓
feder-axum
↓
feder-server
↓
feder-http / feder-core
Notes
- The design should allow another adapter, such as an embedded HTTP runtime, to use
feder-server without depending on Axum.
- Embedded support does not need to be implemented in this issue; the architecture only needs to avoid preventing it.
Currently,
feder-serveris tightly coupled with Axum, a web framework. The goal of this issue is to make the server framework-agnostic so that Axum becomes only one possible adapter.Requirments
Remove Axum dependencies from
feder-serverfeder-servermust not depend onaxum::Router, Axum request/response types, extractors,IntoResponse, or other Axum-specific APIs.feder-axum.Introduce a reusable HTTP boundary
feder-http.feder-servershould consume and produce these HTTP types rather than Axum-specific ones.httpcrate types where practical.Make
feder-serverTower-compatiblefeder-servershould expose atower_service::Serviceinterface.Move Axum integration into
feder-axumfeder-axumshould handle routing, extractors, Axum body conversion, and conversion between Axum andfeder-http.feder-serverwithfeder-axumexplicitly.Notes
feder-serverwithout depending on Axum.