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.
rocket
for the web frameworkdiesel
as the database abstraction and ormserde
for json serialization/deserializationlog
andstderrlog
for configurable logging macrosclap
for commandline argument processingfailure
for error handlingassert_cli
for integration testing
Install the usual tools (i.e. rustup
) and then:
cargo build
cargo run
We'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