Dropshot is a general-purpose crate for exposing REST APIs from a Rust program. For more, see the online Dropshot documentation. You can build the documentation yourself with:
$ cargo +nightly doc
You can build and run the whole test suite with cargo test
. The test
suite runs cleanly and should remain clean.
You can format the code using cargo +nightly fmt
. Make sure to run this
before pushing changes. The CI checks that the code is correctly formatted.
Dropshot servers use a TOML configuration file. Supported config properties include:
Name | Example | Required? | Description |
---|---|---|---|
|
|
Yes |
Specifies that the server should bind to the given IP address and TCP port. In general, servers can bind to more than one IP address and port, but this is not (yet?) supported. |
Dropshot provides a small wrapper to configure a slog-based Logger. You can use this without using the rest of Dropshot. Logging config properties include:
Name | Example | Required? | Description |
---|---|---|---|
|
|
Yes |
Controls where server logging will go. Valid modes are |
|
|
Yes |
Specifies what severity of log messages should be included in the log. Valid
values include |
|
|
Only if |
If |
|
|
Only if |
If |