Crate of the Week

I'd like to nominate crossbeam-channel. It's young and in active development, but deserves more hype.

9 Likes

Whoa!! Super nice! I'll integrate this into my project to replace mpsc and see how it does.

This looks awesome! I will definitely check it out for usage in my project(s)

YEW - a framework for making Elm/React/Angular-like client web-apps with Rust

4 Likes

An awesome Cassowary UI layout implementation. Super useful for the GUI frameworks.

4 Likes

I propose artifact for next week!

It is the open source design documentation tool for everybody.

4 Likes

I'd very much like to nominate https://github.com/autozimu/LanguageClient-neovim. It's not on crates.io, but in my book that doesn't matter. What really makes this outstanding is @autozimu's support, fast response time and time-to-bugfix, his willingness to dive into problems from the interaction with other plugins and the language servers, and to raise issues and interact with the maintainers of those. Three thumbs up!

3 Likes

cargo-bloat - Find out what takes most of the space in your executable.

4 Likes

If I may, sec author here:

I think the “disclaimer” there is important:

...

Besides the secrets crate, there’s also secstr that does something similar.

I would like to point out that both secstr and secrets solve slightly different issues. The data protected by sec is usually sent across the network and passed around among different applications (e.g. a token authorizing a client), e.g. it could reasonably be used as a key for a HashMap:

Moving non-heap allocated data from the stack into a HashMap will cause it to be copied at least once, with no way (to my knowledge) of reliably ensuring that the resulting copy will not be overwritten. One solution for this problem is passing in references and storing a single copy of the confidential information on the heap, where scrubbing is much easier.

This is what secstr seems to do (by wrapping a Vec). The secrets crate also does a much better job at protecting data than sec in a similar vein. secstr requires linking against an external C library (sodium).

Both of these are different use cases though: sec is not written to protect your GPG private key or Bitcoin wallet, which will never leave your machine. Instead, it protects things like your login token which will be serialized and sent as a HTTP-header (with probably one or two extra copies being made somewhere in the stack already), but should not be exposed when a dev turns on logging to see why there are currently so many 500s. It does so with zero overhead (outside of printing), so requiring additional heap allocations is not acceptable. Finally, sec works with any type and requires almost no effort to add.

The disclaimer is in place to ensure no one accidentally uses sec when they really need to use secrets instead. Maybe I should add this Post to the README.md as well? Feel free to send me additional feedback (possibly as a direct message to not derail this thread), I am very happy to discuss and learn about other opinions on this.

7 Likes

H2 tokio based http/2.0 server and client library

4 Likes

actix-web - a small, fast, pragmatic, open source rust web framework.

6 Likes

libasm - a library to provide inline assembly support for stable Rust.

5 Likes

ordermap A hash table (associative array) where the iteration order does not depend on the key or the hash, only insertion and removal.

In particular I find this to be a lifesaver when testing since I can make assertions and the diff (with pretty_assertions) is easy to read if I just called .sort() on both of the inputs first.

Compared to HashMap's which are completely unreadable since the keys can be in literally any order.

4 Likes

configure - pull in configuration from the environment.

1 Like

I haven't seen this mentioned anywhere so far: rust-semverver.
It compares the local version of the crate you are developing with the latest version on crates.io and will print out the major, minor and breaking changes in your local version. While it's not completely bug-free yet, it was moved to the nursery today.

8 Likes

Introducing, skullrump. A way to quickly write UNIX-like binary head and tail routines. I use this to quickly read and write tons of data efficiently in a file-based database system.

With this there's no need to use text files anymore, because doing a binary -> text conversion is very simple with skullrump, allowing users to make use of other UNIX tools such as awk, sed, and friends.

Here is an example invocation of a program that utilizes skullrump:

fswatch myfile.fmt | xargs cog --tail 1 | awk -f avg.awk | fig

This will run my program cog with the tail argument, outputting the last entry every time there is a change to the file being watched by fswatch, passing the output to an averaging awk program, and then printing the result in huge letters with fig.

I'd like to propose built - a crate for putting build time information into the crate.

3 Likes

I'd like to nominate my own project DataFusion (https://www.datafusion.rs/) and (https://crates.io/crates/datafusion) which is query planner / execution framework that can be used as a crate dependency and is also a standalone "Big Data" product for data processing.

4 Likes

I bump v0.1 of my undo redo library rundo. Procedural Macros is really useful, let me can write a easy use undo redo library.

1 Like

I'd like to nominate my own crate, just: GitHub - casey/just: 🤖 Just a command runner / https://crates.io/crates/just

It's a handy little command runner for saving and running project-specific commands.

2 Likes