tismith / device-checkout-rs

A basic device registry, written in rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

device-checkout-rs

Build Status codecov Snap Status Dockerhub Status

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.

We are using:

  • rocket for the web framework
  • diesel as the database abstraction and orm
  • serde for json serialization/deserialization
  • log and stderrlog for configurable logging macros
  • clap for commandline argument processing
  • failure for error handling
  • assert_cli for integration testing

Installation:

Using cargo:

Install the usual tools (i.e. rustup) and then:

cargo build
cargo run

Using snap:

We're using snapcraft to automatically build snaps of device-checkout.

sudo snap install device-checkout

Using docker:

#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

About

A basic device registry, written in rust

License:MIT License


Languages

Language:Rust 81.5%Language:HTML 11.0%Language:TSQL 5.8%Language:Dockerfile 1.6%