ulo
ulo
Documentation

Start here

IntroductionInstallationQuick StartProject StructureDevelopment Workflow
Coming from NestJSNestJS topics, mapped

The model

Protocols

Integrations

Operating

Reference

Getting Started

Installation

Dependency lines for a tokio or smol application, Rust versions per crate, and installing the CLI.

Where the crates come from

0.1.0-alpha.3 is the current release, on crates.io. Every ulo-* crate in one application names the same version, since the crates pin each other to an exact version.

ulo = "=0.1.0-alpha.3"

Rust versions

Rust 1.88 is the floor for the workspace, and the crates use edition 2024. Five crates declare a higher floor, and an application that depends on one needs at least that version:

CrateRust
ulo-graphql-async-graphql, ulo-db-diesel1.89
ulo-http-salvo1.92
ulo-db-sqlx, ulo-db-seaorm1.94

ulo-rpc-kafka builds librdkafka and needs a C toolchain.

An HTTP application on tokio

This is the dependency set of examples/01-hello, with the release version in place of the example's workspace paths:

Cargo.toml
[dependencies]
ulo = "=0.1.0-alpha.3"
ulo-http = "=0.1.0-alpha.3"
ulo-http-hyper = "=0.1.0-alpha.3"
ulo-runtime-tokio = "=0.1.0-alpha.3"
serde = { version = "1", features = ["derive"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
CrateRole
uloThe core: modules, the container, executions, the application phases, TestApp
ulo-httpHTTP handlers, extractors, replies, pre-dispatch middleware
ulo-http-hyperThe reference HTTP server, on hyper
ulo-runtime-tokioThe tokio runtime, and shutdown_signal for SIGINT and SIGTERM

serde is needed once a handler takes or returns a typed body. ulo-http-hyper has one feature, tokio, on by default: it brings ulo-listener-tokio and the Server alias over it.

To run the application inside axum, actix-web, poem, rocket or salvo, an embedding crate replaces ulo-http-hyper: ulo-http-axum, ulo-http-actix, ulo-http-poem, ulo-http-rocket or ulo-http-salvo. See HTTP Servers.

An HTTP application on smol

examples/22-http-on-smol turns the tokio feature off and adds the smol listener and runtime:

Cargo.toml
[dependencies]
ulo = "=0.1.0-alpha.3"
ulo-http = "=0.1.0-alpha.3"
ulo-http-hyper = { version = "=0.1.0-alpha.3", default-features = false }
ulo-listener-smol = "=0.1.0-alpha.3"
ulo-runtime-smol = "=0.1.0-alpha.3"
async-signal = "0.2"
futures-util = "0.3"

ulo-runtime-smol ships no equivalent of ulo-runtime-tokio's shutdown_signal, so the example writes the SIGINT and SIGTERM future with async-signal. The main is under Quick Start.

Other transports and integrations

Each is a crate added beside ulo, and its page lists the crates:

Transport or integrationStart at
WebSocketWebSocket
RPC over TCP, UDP or a brokerMicroservices
gRPCgRPC
GraphQLGraphQL
DatabasesDatabase
ConfigurationConfiguration

The CLI

ulo-cli installs the ulo binary. The commands are on CLI, and the install line on CLI Installation.

The examples

The repository holds 41 packages under examples/, named ex-NN-name. Each is a library with its application in src/lib.rs, a src/main.rs that runs it, and tests.

git clone https://github.com/ulo-rs/ulo
cd ulo
cargo run -p ex-01-hello

Introduction

What Ulo is made of, how an application starts, and which pages to read in which order.

Quick Start

One module, one controller and one route, served on tokio and hyper.

On this page

Where the crates come fromRust versionsAn HTTP application on tokioAn HTTP application on smolOther transports and integrationsThe CLIThe examples