Reimplementation of https://github.com/tismith/deviceCheckout in rust. Basically complete now. The HTTP API endpoints could use some more breadth, but the form based web ui is functional.
Since this is using rocket for the web framework, we need to use rust nightly, so we've pinned a working compiler using the rustc-toolchain file. Cargo build will pull down and install the correct compiler.
We use diesel-migrations to automatically build and migrate the database. No need to seed the database manually.
rocketfor the web frameworkdieselas the database abstraction and ormserdefor json serialization/deserializationlogandstderrlogfor configurable logging macrosclapfor commandline argument processingfailurefor error handlingassert_clifor integration testing
Install the usual tools (i.e. rustup) and then:
cargo build
cargo runWe're using snapcraft to automatically build snaps of device-checkout.
sudo snap install device-checkout#Runs device-checkout on port 1234 with the database at /var/lib/devices.db
docker run -p 1234:8000 -v /var/lib:/var/lib/device-checkout tismith/device-checkout-rs