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:
| Crate | Rust |
|---|---|
ulo-graphql-async-graphql, ulo-db-diesel | 1.89 |
ulo-http-salvo | 1.92 |
ulo-db-sqlx, ulo-db-seaorm | 1.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:
[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"] }| Crate | Role |
|---|---|
ulo | The core: modules, the container, executions, the application phases, TestApp |
ulo-http | HTTP handlers, extractors, replies, pre-dispatch middleware |
ulo-http-hyper | The reference HTTP server, on hyper |
ulo-runtime-tokio | The 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:
[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 integration | Start at |
|---|---|
| WebSocket | WebSocket |
| RPC over TCP, UDP or a broker | Microservices |
| gRPC | gRPC |
| GraphQL | GraphQL |
| Databases | Database |
| Configuration | Configuration |
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