Crate of the Week

https://github.com/VFLashM/tuple_list
This one looks handy!

1 Like

A library for setting up Rust objects inspired by factory_bot.
https://github.com/TaKO8Ki/beaver

crates: https://crates.io/crates/beaver
docs: beaver - Rust

1 Like

Nominating cargo-about, because it lets you create the file you're legally obliged to ship with your executable according to most licenses' text. Also, it checks crates against your list of approved licenses. Where there's a choice of license, it only includes the license you've approved. By default it generates HTML, but with some fiddling about with the about.hbs it can produce nice plain text output too. Saved me a lot of time.

10 Likes

Nominating fs-err.

When you use std::fs, you may get very unhelpful errors like
The system cannot find the file specified. (os error 2)
that don't show the path of the file on which the error occured.

fs-err wraps the functions in std::fs and adds the path information to the error while staying compatible with std::io::Error.
Saved me the pain of adding the error context myself everywhere.

16 Likes

Nominating https://github.com/lukaslueg/volkswagen/tree/HEAD/volkswagen because it's funny.

7 Likes

https://github.com/mozilla/uniffi-rs

Looks interesting...

4 Likes

https://github.com/ritchie46/polars

1 Like

Not sure if this has been featured before:

https://github.com/dtolnay/paste

For concatenating idents!

3 Likes

https://github.com/agausmann/declio

1 Like

https://crates.io/crates/genpdf
From the readme: "A user-friendly PDF generator written in pure Rust."

https://github.com/unicode-org/icu4x
That's from the official unicode consortium!

14 Likes

That definitely gives me some ideas for the time crate! The formatting is (unsurprisingly) based on the Unicode standard, bit it is something to look at.

1 Like

https://github.com/joshua-maros/scones
An alternative to derive-builder

2 Likes

https://github.com/EmbarkStudios/rust-gpu

0.1 release was just announced: https://github.com/EmbarkStudios/rust-gpu/releases/tag/v0.1

6 Likes

https://github.com/sonos/dinghy

https://github.com/visioncortex/vtracer

Online demo can be found here:

https://www.visioncortex.org/vtracer/

3 Likes

https://github.com/sunfishcode/cap-std

Allows applications to better declare their intentions programmatically for harder-to-abuse interfaces.

8 Likes

https://github.com/zheland/typed-index-collections

Vec but with strongly typed indices, e.g. instead of Vec<CpuUsage> // Indexed by CPU core you can do TiVec<CpuCoreId, CpuUsage>. It prevents accidentally using the wrong index type, which is a common source of bugs.

Despite how useful it is (and IMO should be in std), it has 0 stars and only 300 downloads.

5 Likes

Rustc uses something similar: IndexVec in rustc_index::vec - Rust

3 Likes

https://github.com/sonos/tract

Somehow this has never been suggested (or I didn't find it :slight_smile: ). A neural network inference library, written purely in Rust for models in ONNX, NNEF and TF formats. Very extensive support for many different operators and comparable speed to the onnxruntime Python package.

Also compiles to WebAssembly and has JS bindings (https://github.com/bminixhofer/tractjs).

IMO the most important crate for working with Neural Networks in Rust. Support for inference of other ML models such as Decision Trees is also coming up.

8 Likes