Rust codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged fullstack application built with Rust fast HTTP implementation Hyper in including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Rust community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
This is an application written in Rust using these crates:
- Hyper - a fast HTTP implementation written in and for Rust
- Tiberius - Microsoft SQL Server async Rust driver written in Rust
- Serde - a framework for serializing and deserializing Rust data structures efficiently and generically
- Reroute - A router for Rust's hyper framework using regular expressions
- IIS - Set of helper functions for running web server written in Rust on Internet Information Services (IIS)
Install Rust: https://www.rustup.rs/
Get Microsoft SQL Server 2017+. SQL Express Edition is OK (when released), Azure SQL Database is OK, LocalDB does NOT work. Make sure TCP is enabled on the Server (enabled in Azure SQL by default, disabled by default on local installations).
On the desired Microsoft SQL Server run database.sql
script to create database Conduit
and all the tables, functions etc.
Copy conduit - sample.toml
to conduit.toml
and set your connection string there. Please note the connection encryption must adhere to crate configuration in Cargo.toml see Tiberius documentation on Encryption. Default Cargo.toml configuration works for Azure SQL (encrypted; if using please make sure you add your local IP address to the firewall rules).
Build locally with integration tests:
./locbld.cmd
Or run locally:
./run.cmd
API URL: http://localhost:6767