This project explores using using Rust in a DDD-esque fashion (cleanly separated domain
and infra
), along with
the current (as of writing) Rust web tools, such as actix-web
, and generated-from-source OpenAPI spec.
In specific:
- actix-web
- Mixing Future 0.1 with async/await-ready Future 0.3
- Using
async/await
via nightly- Using it with traits via
async-trait
- Using it with traits via
- Using paperclip to generate OpenAPI from source
- Using
future_locks
for async mutexes - Compiling static assets into the binary.
- DDD-esque project structuring using workspaces to keep dependencies pure
- Postponing of concrete types for interfaces (
trait
s) to maximise testability
This is spiritually the sister project to the Go version.
This project requires nightly, so you'll need to rustup toolchain install nightly
, then run via
cargo +nightly run
After that, go to http://localhost:8080/swagger/index.html to play around with the built-in Swagger spec + UI.
If, for some reason, nightly is borked, nightly-2019-08-20-x86_64-apple-darwin
has been known to work; just install
the right toolchain (nightly-2019-08-20-${your-architecture}
) and run with that instead.