This adds a proposal for how this (and potentially other thick server framework) crates could support many different sub-libraries (ex tonic, axum, warp, etc) without having to make a breaking change/version bump for each breaking change of the sub-libraries. This works by having external crates or the actual sub-library crate implement the default settings via an extension trait.
Example
use server_framework::{Config, Server};
use server_framework_tonic::ServerExt;
#[tokio::main]
async fn main() {
init_tracing();
let config = Config::default();
let service = GreeterServer::new(MyGreeter);
Server::new(config)
.with_tonic(service)
.always_live_and_ready()
.serve()
.await
.expect("server failed to start");
}
This adds a proposal for how this (and potentially other thick server framework) crates could support many different sub-libraries (ex tonic, axum, warp, etc) without having to make a breaking change/version bump for each breaking change of the sub-libraries. This works by having external crates or the actual sub-library crate implement the default settings via an extension trait.
Example