Crate of the Week

I nominate my fun project: daktilo

daktilo (pronounced "duck-til-oh") is a small command-line program that plays typewriter sounds every time you press a key. It also offers the flexibility to customize keypress sounds to your liking. You can use the built-in sound presets to create an enjoyable typing experience, whether you're crafting emails or up to some prank on your boss.

1 Like

https://pest.rs/ is incredible.

4 Likes

I would like to nominate yarer https://crates.io/crates/yarer

It's a library I wrote for the processing and evaluating of mathematical expressions, with variables and functions, using Reverse Polish Notation.

Yarer can be used also from command line, and behaves in a very similar manner to GNU bc.

I'd like to self-nominate password-worker

It's a fully generic, statically dispatched password worker that uses a rayon thread pool to hash passwords outside of any async runtime threads.

PasswordWorker is Send + Sync + Clone + 'static, clones are shallow copies pointing to the same threadpool, and all methods only use &self, so you don't need a Mutex or Arc to include it in the various shared state extractors offered by frameworks like axum.

I have tested compatibility with tokio and async-std runtimes.

I really enjoyed making it, PRs open!

2 Likes

I'd like to self-nominate EDMA - embedded database management tool

EDMA is an interactive terminal app for managing multiple embedded database systems simultaneously with powerful byte deserializer support.

It integrates with top embedded databases in Rust ecosystem: RocksDB, ReDB, SQLite...

I am working on the Desktop version of EDMA to deliver a better user interface, open for public contributions!

1 Like

I'd like to self-nominate Rinf(Rust in Flutter)

Preview

Rinf is a production-ready framework for creating beautiful and performant cross-platform apps using Flutter and Rust with batteries fully included. Simply add this framework to your app project, and you're all set to write Flutter and Rust together!

Visit the demo running on the web to experience the smoothness and delightfulness that comes from the combination of Flutter and Rust. You can also dive into the example code.

  • :white_check_mark: Linux: Tested and supported
  • :white_check_mark: Android: Tested and supported
  • :white_check_mark: Windows: Tested and supported
  • :white_check_mark: macOS: Tested and supported
  • :white_check_mark: iOS: Tested and supported
  • :white_check_mark: Web: Tested and supported

It's truly easy to set up. It only takes about about a minute or two to fully setup your app. No other solution provides this level of convenience.

5 Likes

See optimized assembly of any function in your program. It's like a local version of rust.gotbolt.org. Useful for optimizing (even for non-asm-experts).

10 Likes

I'd like to nominate Oort.

Oort is a "programming game" where you write Rust code to control a fleet of spaceships. Your code is responsible for the engines, weapons, radar, and communications of ships ranging from tiny missiles to massive cruisers.

Apologies if this doesn't qualify since it's not strictly a standalone crate, but it's pretty cool in any case.

6 Likes

I would like to self-nominate webpage-rs, a small library to fetch info about a web page: title, description, language, HTTP info, links, RSS feeds, Opengraph, Schema.org, and more.

It is used in e.g. Lemmy to display an image and title text for submitted links.

5 Likes

For those trudging through overgrown XML forests, may tagu be your billhook!
I've appreciated how it helps me author XML programmatically in Rust.

1 Like

I nominate shared-bus which provides a clean, race-free way of using a single I²C bus with multiple drivers. This comes in extremely handy as soon as one adds the second device to one’s embedded project. :wink:

The backstory for the implementation is fascinating too for those who want to deep dive: How can we share a bus between multiple drivers? · Issue #35 · rust-embedded/embedded-hal · GitHub

3 Likes

I nominate Silkenweb, a library for building web apps with fine-grained reactivity and a clean separation of logic and UI.

3 Likes

Looks very nice. The demo did not load on my MacBook M1 though...

I'd like to nominate the Stalwart mail server, an all-in-one (SMTP + IMAP + JMAP) mail server, which is incredibly easy to set up (I came to it after failing to correctly set up Postfix), very easy to administrate, and full-featured.

4 Likes

I would like to nominate bore, "a simple CLI tool for making tunnels to localhost". It’s similar to ngrok for setting up ingress tunnels, but much much simpler and barebone. Just does one thing well.

2 Likes

I'd toss in a self-nomination for modyne, a higher-level crate for building single-table data models on top of AWS DynamoDB, and is based on the concepts in Alex DeBrie's The DynamoDB Book. The code includes modyne implementations of all four data model examples provided in the book. One such example from chapter 21 is the Github data model.

Self suggestion: a super simple CLI to ask a yes or no questions for use in personal scripts: GitHub - SUPERCILEX/ask-cli: `ask` offers a simple way to ask a yes or no question on the CLI, returning exit code 0 on "yes" and 1 on "no".

I’d have to send a nomination for Axum_login which is an Authenticator and session manager for use with Axum.

It’s been really useful for me just to plug in and make it work, whilst giving me sufficient customisation options to make it work how I want it to. It’s also just hit 0.8 as of a few days ago.

It's been mentioned before by @H2CO3 but I just have to renominate Typst. A modern LATEX alternative written entirely in rust.

Or To quote @H2CO3

I've been working with it for my master thesis for about a month and so far it is a blast. It is like LATEX but written for a modern audience.

For reference: In 10 years of LATEX I have never learnt how to do any package programming and even simple things I couldn't do if there wasn't a package available. With Typst I made my first contribution on github this week.

11 Likes

I’d have to send a nomination of datetime crates fastdate

way fastdate?

  • full test, Code testing coverage >= 99%
  • Powerful, easy to use
  • based on crate time

this date cartes is very fast, many method option (<= 50ns) including

fastdate = "0.3"
use fastdate::DateTime;
fn main(){
    //now with local time zone
    DateTime::now();
    //utc time now
    DateTime::utc();
    // add
    DateTime::now() + Duration::from_secs(1);
    // sub
    DateTime::now() - Duration::from_secs(1);
    //parse allow token = ["YYYY","MM","DD","hh","mm","ss",".000000","+00:00"]
    fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000000Z", "2022-12-13 11:12:14.123456789Z").unwrap();
    fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000000+00:00", "2022-12-13 11:12:14.123456789+06:00").unwrap();
    DateTime::parse("hh:mm:ss.000000,YYYY-MM-DD","11:12:14.123456,2022-12-13").unwrap();
    //format allow token = ["YYYY","MM","DD","hh","mm","ss",".000000","+00:00"]
     let dt = fastdate::DateTime::from((
        Date {
            day: 1,
            mon: 1,
            year: 2000,
        },
        Time {
            nano: 1233,
            sec: 11,
            minute: 1,
            hour: 1,
        },
    ));
    let str:String = dt.format("YYYY-MM-DD/hh/mm/ss");
    //befor,after
    let date1 = DateTime::from_str("2022-12-12 00:00:00").unwrap();
    let date2 = DateTime::from_str("2022-12-12 01:00:00").unwrap();
    assert_eq!(date2.after(&date1), true);
    assert_eq!(date1.before(&date2), true);
    //from str
    let datetime=DateTime::from_str("1234-12-13 11:12:13.123456");
    //from str time zone
    let datetime=DateTime::from_str("1234-12-13 11:12:13.123456+08:00");
    let datetime=DateTime::from_str("1234-12-13 11:12:13.123456Z");
    //to_string()
    let s = datetime.to_string();//1234-12-13 11:12:13.123456
    //unix_timestamp
    let timestamp = DateTime::now().unix_timestamp();
    //from unix_timestamp
    let datetime = DateTime::from_timestamp(timestamp);
    //unix_timestamp_millis
    let timestamp = DateTime::now().unix_timestamp_millis();
    //from unix millis
    let datetime = DateTime::from_timestamp_millis(timestamp);
    //unix_timestamp_nano
    let timestamp = DateTime::now().unix_timestamp_nano();
    //from unix_timestamp_nano
    let datetime = DateTime::from_timestamp_nano(timestamp);
    //sum Greenwich Mean Time (GMT) from datetime
    let time_gmt = DateTime::now().sub(Duration::from_secs(offset_sec() as u64));
}