Survey of the Rust web scene in mid-2019, covering async/await, DDD-esque structure, testing, mocking, OpenAPI, and Actix
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:
async/await
via nightly
async-trait
future_locks
for async mutexestrait
s) to maximise testabilityThis 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.