ulo is a Rust server framework for applications with more than one kind of client. HTTP routes, WebSocket gateways, RPC handlers, gRPC services and GraphQL resolvers are declared on plain structs and share a dependency injection container, configuration, health probes and shutdown. Modules, providers, controllers, guards and interceptors follow NestJS.

#[injectable] pub struct Greeter; impl Greeter { pub fn greet(&self, name: &str) -> String { format!("Hello, {name}!") } } #[controller] pub struct GreetingController { greeter: Dep<Greeter>, } #[handlers] impl GreetingController { #[ulo_http::get("/greetings/{name}")] fn greet(&self, name: Path<String>) -> Json<Greeting> { Json(Greeting { message: self.greeter.greet(&name.0) }) } } 

The core owns no async runtime and no socket. The same module runs on tokio or smol, behind hyper, axum, actix-web, poem, rocket or salvo for HTTP, and over TCP, UDP, NATS, Redis, MQTT, RabbitMQ or Kafka for RPC.

A Codespace opens the repository with the CLI installed: Sign in to GitHub · GitHub. In its terminal, ulo new my-app && cd my-app && cargo run creates and runs an application with health probes and tests.

The API may change before beta. CI runs on Linux only.

Check it out. Which parts of the API feel like they could have been done better?

1 post - 1 participant

Read full topic