@jonas Besides the other answers:
If you are looking for a way to store multiple bool values in a memory efficient way, have a look at bitvec crate:
https://docs.rs/bitvec/latest/bitvec/
"[bitvec] specializes standard-library data structures (slices, arrays, and vectors of bool) to use _one-bit-per-bool storage_[...]"
"[it] brings the capabilities of C++βs compact bool storage and Erlangβs decomposable bit-streams to Rust" - from their docs
#Rust #rustlang #crate #CrateTip
winnow - Making parsing a breeze:
https://github.com/winnow-rs/winnow
winnow is a parser combinator library written in Rust that started as a fork of #nom.
Not sure yet, if I should migrate from nom 4.* to #winnow or #chumsky. I really do like the good error recovery and parsing capabilities for PEGs of chumsky.π₯°
#nom #winnow #chumsky #Rust #rustlang #parser #CrateTip
It's here! π
Announcing match-commutative | A #Rust macro that helps matching on patterns commutatively, reducing the use of duplicated patterns. β¨
This can be useful, if you need to match on `(operant1, op, operant2)`, where `op` builds a commutative relation between `operant1` and `operant2`.
Please see the docs for the actual use case and an example:
https://docs.rs/match-commutative
Tagging @rjacobson and @tuck, because they've been interested in this. π
#Rust #rustlang #crates #CrateTip
Oh, this looks fantastic! β¨
#Rust library to compare strings (or any sequences). 25+ algorithms, pure Rust, common interface, #Unicode support.
https://github.com/life4/textdistance.rs
Based on popular and battle-tested textdistance #Python library (and written by the same author).
Apparently, it also takes algorithms from the #talisman #JavaScript library, which I wished for to be written in Rust.
https://github.com/Yomguithereal/talisman
#TextProcessing #NLP #TextDiffing #Diff #RustLang #Crate #CrateTip
#Rust #unicode #Python #talisman #JavaScript #textprocessing #NLP #textdiffing #diff #rustlang #crate #CrateTip
As Jon said, HashSet and HashMap iteration ordering is random.
If you need to iterate in insert order, you can use a crate called indexmap by @bluss
https://lib.rs/crates/indexmap
It provides Set and Map data structures.
#Rust #rustlang #collections #CrateTip
Ok, this looks really useful:
mirror-mirror | Powerful reflection library for #Rust (by EmbarkStudios)
https://github.com/EmbarkStudios/mirror-mirror
Especially, because Rust is known to lack capabilities of reflection.
And what a cool name! π
#CrateTip #crate #rustlang #reflection #Rust