Crate of the Week

fancy-regex is really cool. It implements backtracking and look-around for regular expressions while delegating as much as possible to the regex crate.

In essence, it is a backtracking VM (as well explained in Regular Expression Matching: the Virtual Machine Approach) in which one of the "instructions" in the VM delegates to an inner NFA implementation (in Rust, the regex crate, though a similar approach would certainly be possible using RE2 or the Go regexp package). Then there's an analysis which decides for each subexpression whether it is "hard", or can be delegated to the NFA matcher. At the moment, it is eager, and delegates as much as possible to the NFA engine.

5 Likes

iai looks really nice. From the README:

Iai is an experimental benchmarking harness that uses Cachegrind to perform extremely precise single-shot measurements of Rust code.

2 Likes

Rocket is a great crate!
Really old thread, surprised to see it still going!

1 Like

These crate nominations are looked through to find a "crate of the week" to highlight in the "this week in rust" community newsletter.

This thread and "quote of the week" are special in the same way :slight_smile:

2 Likes

Small but useful: I recently discovered the thread-io crate, which makes it easy to put a reader into a background thread so that processing can happen concurrently. The win for this for me was to have one thread decoding a zstd-compressed file while the main thread parsed its contents using the csv crate. It sped things up by about 1.6x parsing a large csv file (8.7GB compressed, 79GB uncompressed) with very modest code changes.

7 Likes

Lever: library for writing transactional systems.

3 Likes

There are some situations, when you have an existing api and someone asks for a swagger.
So opg is simple library for generating OpenAPI 3.0 docs from structs. It parses serde attributes, so you only need to specify OpenAPI related stuff.

4 Likes

salak is a layered configuration loader with zero-boilerplate configuration management. Aim to simplify configuration parsing codes.

2 Likes

cns (Crate Name Search) is a handy terminal based interface to search for Rust crates. I like using it to quickly:

  • Copy the crate dependency line for Cargo.toml to the clipboard
  • Open the crate docs or repo in a browser
2 Likes

Camino is an API mirroring std::path, but UTF-8 encoded instead of using OsString.

2 Likes

Sorceress is a Rust environment for sound synthesis and algorithmic composition, powered by SuperCollider. It provides:

  • A real-time audio synthesis engine
  • A massive library of unit generators
  • Audio I/O with your operation system and sound card
3 Likes

bset: "Fast and compact sets of bytes or ASCII characters"

2 Likes

ibig: "A big integer library in Rust with good performance."

2 Likes

conrod

egg "The egg project uses e-graphs to provide a new way to build program optimizers and synthesizers."

There's also a short MDBook introducing the conceptual space of e-graphs and how to get started with the crate, which I thought was very nice: egg::tutorials - Rust

6 Likes

single

This crate provides the Single trait for extracting the element from a single-element iterator.

crabzilla

Crabzilla provides a simple interface for running JavaScript modules alongside Rust code.

1 Like

Self-nomination, but many people were enthusiastic about it when it was announced:

tide-acme

Automatic HTTPS certificates for Tide, via Let's Encrypt and ACME tls-alpn-01 challenges.

8 Likes

uwuify

UwUifies text very very fast

5 Likes

An extension for actix-web to validate user permissions
https://github.com/DDtKey/actix-web-grants

1 Like