Crate of the Week

I’ll do my part, since suggestions have been scarce:

In light of the release of Rocket 0.5 I thought that it must be worth a suggestion.

Rocket aims to be fast, easy, and flexible while offering guaranteed safety and security where it can. Importantly, Rocket also aims to be fun , and it accomplishes this by ensuring that you write as little code as needed to accomplish your task.

4 Likes

Shutdown management for graceful shutdown of tokio applications. Guard creating and usage is lock-free and the crate only locks when:

  • the shutdown signal was not yet given and you wait with a (weak or strong) guard on whether or not it was in fact cancelled;
  • the check of whether or not the app can shut down typically is locked until the shutdown signal was received and all (strong) guards were dropped.

It's the kind of thng that you can also do alone, but why would you want it, and if so, better make sure it's done correctly.

In order to avoid you having to figure out how to do it yourself correctly, it is much easier to use this crate instead.

3 Likes

As promised during RustLab in Florence, here is my crate proposal: https://crates.io/crates/symbols

Symbols is an utility, not a standalone crate, that allows people quickly create proc-macros to solidify database tables into enums, e.g. allowing compile time foreign keys checks

2 Likes

strum was CotW 2017-06-27

https://crates.io/crates/const_format has some nice helpers.

https://crates.io/crates/buildstructor - "builders" for arbitrary methods with many arguments, not just constructors.

1 Like