| Crates.io | trestle |
| lib.rs | trestle |
| version | 0.1.0 |
| created_at | 2025-10-26 03:47:56.414578+00 |
| updated_at | 2025-10-26 03:47:56.414578+00 |
| description | A CLI tool to scaffold Rust web applications with Axum, Dioxus, or HTMX. |
| homepage | |
| repository | https://github.com/RedHoodJT1988/trestle |
| max_upload_size | |
| id | 1900913 |
| size | 41,420 |
Trestle a new path for Rust web development. One command to rule all your boilerplate.
Trestle is a command-line tool designed to eliminate the boilerplate and setup cost of starting a new full-stack project in Rust. Inspired by frameworks like Django and Rails, Trestle scaffolds a complete, runnable application with a lightning-fast Axum backend, so you can start building features immediately.
Choose between a modern, reactive frontend with Dioxus (all in Rust!) or the elegant simplicity of server-rendered HTMX.
sqlx).env.example, pre-configured Cargo.toml, and all necessary connection logic.Once published, you can install trestle directly from crates.io:
cargo install trestle
You can also build and install from the source code:
git clone https://github.com/RedHoodJT1988/trestle.git
cd trestle
cargo install --path .
The main command is Trestle new. It takes a project name and optional flags to configure the frontend and database.
trestle new <PROJECT_PATH> [OPTIONS]
| Flag | Argument | Description |
|---|---|---|
--frontend |
dioxus (default), htmx |
The frontend framework to use. |
--db |
postgres, mysql, mongodb, firebase |
The database to configure. If omitted, a static site (no DB) is created. |
-h, --help |
Print help information. |
trestle new my_static_site
trestle new my_htmx_blog --frontend htmx
trestle new my_store --db postgres
trestle new my_dashboard --frontend htmx --db mongodb
Running trestle new my_app --db postgres will generate the following structure:
my_app/
βββ .env.example # Environment variables (e.g., DATABASE_URL)
βββ .gitignore
βββ Cargo.toml # Pre-configured with Axum, Dioxus, SQLx, etc.
βββ Dioxus.toml # Dioxus build configuration
βββ index.html # Entrypoint for the Dioxus WASM app
βββ src/
βββ main.rs # Axum server entrypoint, routing, and state
βββ lib.rs # The root Dioxus application component
βββ db.rs # Database connection pool logic and models
We are thrilled you're interested in contributing to Trestle! This project is a community effort, and we welcome help of all kinds, from fixing bugs to adding new features.
git clone https://github.com/RedHoodJT1988/trestle.git
cd trestle
git checkout -b feature/my-new-feature
src/main.rs and src/scaffold/mod.rs.templates/ directory.templates/redis-htmx and templates/redis-dioxus) and update the main.rs file to recognize the new --db redis flag.cargo build --release
./target/release/trestle new test-project --db YOUR_NEW_DB
cd test-project
cargo run
main branch of the original repository.We have big plans for trestle! Here are some of the features we'd love to add:
Redis, SQLite (great for simple apps!), and other popular databases.Dockerfile and fly.toml generation for easy deployment.trestle new command that walks the user through the setup process.Your contributions are essential to making this happen!
This project is licensed under the MIT License. See the LICENSE file for details.