lilyRUST FRAMEWORK
RUST. THROUGH AND THROUGH.

Focus on your
application.

Let Lily manage dependencies and lifecycle. Build on the same foundation, from HTTP APIs to real-time connections.

Typed APIs Built-in DI Managed lifecycle

LILY'S FOUNDATION

Connects your services.
Manages their lifecycle.

An HTTP request, a WebSocket message or a queued job. At the heart of your application: the same dependency model and explicit resource ownership.

Bring your services together.

Define dependencies and lifetimes. The container creates services, resolves their dependencies and cleans them up when their lifetimes end.

HTTP APIWebSocketConsumer
DI containerSingleton · Scoped · Transient
Explore dependency injection

Together, from startup to shutdown.

Lily owns the application lifecycle. Preparation, execution and shutdown each have clear responsibilities.

  1. 01
    build

    The container, controllers and policies are prepared.

    Prepare
  2. 02
    start

    The listener opens; requests or messages are accepted.

    Run
  3. 03
    close

    New work stops; managed resources are awaited as they close.

    Close
Learn about the application lifecycle
WHAT WILL YOU BUILD?

One foundation.
Different applications.

Choose your entry point. Follow the examples step by step, from your first application to advanced topics.

01 / HTTP

HTTP API

lily_http_api

Build your API with controllers and typed requests and responses. Connect security and data access to the same application.

  • Routing, middleware and guards
  • Authentication, CORS and CSRF
  • OpenAPI, files and streaming
Read the HTTP guide 38 topics · From your first application to advanced usage
02 / WEBSOCKET

WebSocket

lily_websocket

Manage connections, messages and room broadcasts. Build real-time communication with typed controllers.

  • Message protocol, Emit and Ack
  • Rooms and client targeting
  • Backpressure and shutdown
Read the WebSocket guide 43 topics · From server to first client
03 / CONSUMER

Consumer

lily_consumer

Process RabbitMQ messages with typed handlers. Manage queues, transactions and shutdown through one application lifecycle.

  • Typed messages, middleware and guards
  • Retries, dead letters and settlement
  • Transactional inbox, outbox and AsyncAPI
Read the Consumer guide 39 topics · From your first message to operations
YOUR FIRST APPLICATION

Try it now.

Choose your project, run the commands and paste the code into src/main.rs. Get your first response right away.

One endpoint, one Rust file. Get your first HTTP response.

Rust 1.96.1+ · Commands are for Bash / Zsh.

Create the project

Terminal
cargo new --bin --edition 2024 api
cd api
cargo add lilyrs@0.1.0 --features http-api
cargo add tokio@1 --features macros,rt-multi-thread
Step 1 / 4
Continue with the guide

AS YOUR APPLICATION GROWS

Add the pieces
you need.

From databases to security, file transfers to observability. Find setup instructions and usage limits for each topic in the guides.

YOUR NEXT STEP

Start with your first application.

From setup to your first response. Get to know Lily by writing code.

One package. The components you need. lilyrs 0.1.0

cargo add lilyrs@0.1.0 --features http-api

Choose http-api for HTTP APIs, websocket for real-time connections, or consumer for message processing.