The limiting-factor crate offers facilities to implement a REST API.
The goal of this library is to provide:
That allows an API or a back-end web server to focus on requests and data model, and to maintain helper methods as a separate library.
You need to give to rustc
some hints about where libpq.lib
is.
This is known to have worked:
setenv LIB "C:\Program Files\PostgreSQL\10\lib"
cargo clean
cargo run
The glue code to use Rocket with Diesel is adapted from the Rocket guide. See https://rocket.rs/guide/state/#databases. Guide author: Sergio Benitez.