Crate of the Week

We were told there wasn't enough crates proposals here.

So here's mine: lazy-regex, which lets you concisely create lazy static regular expressions checked at compile time, with some special matching into tuples ability:

let (whole, name, version) = regex_captures!(
    r#"(\w+)-([0-9.]+)"#, // a literal regex
    "This is lazy_regex-2.0!", // any expression
).unwrap();
2 Likes

atoi_radix10: Rust port of fast integer parsing.

1 Like

deku for sure. It's basically magic for parsing binary data, and a great declarative parsing library. Hope it grows & sees wider community adoption & support.

3 Likes

https://crates.io/crates/fallible_collections which provides allocation fallible standard std types

3 Likes

gpg-tui: A terminal user interface for GnuPG

I'd like to nominate rustc_codegen_gcc, a compiler backend for Rust using GCC for code generation.

It had a major milestone this week: rustc_codegen_gcc can now run libcore’s tests and pass most of them

14 Likes

I'd like to nominate cargo-sort, a Cargo plugin that ensures a consistent sorting of your dependencies and workspace member tables in Cargo.toml. Of course it also has a --check flag for CI :slight_smile:

7 Likes

Write desktop applications in Rust and Flutter!

5 Likes

Like a fixed-count Rc without the runtime cost.

10 Likes

Cycle-aware Rc, a mini tracing GC that can be used to implement self-referential data structures of strong references without memory leaks.

3 posts were split to a new topic: Cactusref: cycle-aware reference counting

(Self-nomination) Public-key / Shared-key encryption library for serde::{Serialize, Deserialize} types.

5 Likes

pipeline, a macro crate for function composition and partial function application making deeply nested function calls a lot nicer.

Edit: I take it back, I found a few serious limitations that need to be resolved before advertising it to a broader audience.

1 Like

Maybe the fastest Rust HashMap...

4 Likes

Hypergraph - a data structure library to create a directed hypergraph in which a hyperedge can join any number of vertices.

2 Likes

Background processing for Rust

3 Likes

CSS-inline

(Self-nomination) Inlining CSS into style tags.

Useful for composing HTML emails.

2 Likes

prae

This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you specified.

4 Likes

I think this is an amazing example of a strongly typed JSON API, which is no small feat considering how flexible JSON is when sent from javascript or python. Ruma accomplishes this with some pretty cool macros, that are also worth checking out, and lots of custom serde impls.

ruma-events => macros
ruma-client-api => macros

3 Likes

rust_ipify is a small client library for ipify service.
Is a Client of API-bindings to retrive information about IP address and the global IP address of the machine.
You can find the Crate here