SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Rust Data structure Projects
All Algorithms implemented in Rust (by TheAlgorithms)Project mention: New colorscheme | reddit.com/r/neovim | 2022-11-03
Oh, i didn't implement convex hull algorithm. And that was a random file i opened from the Rust-Algorithms repo, I contributed with some algos few months back!
Tools for concurrent programming in RustProject mention: This implementation is actually unsafe since we don't check if the index is in-bounds. But this is fine since this is only used internally. | reddit.com/r/rustjerk | 2022-12-26
Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.
Common data structures and algorithms in RustProject mention: Anything C can do Rust can do Better | dev.to | 2022-12-01
Algorithm Cookbook in Rust - Aram Ebtekar
🚀 efficient approximate nearest neighbor search algorithm collections library written in Rust 🦀 .Project mention: An efficient library for nearest neighbor search in native rust | news.ycombinator.com | 2022-03-27
Blazing fast concurrent HashMap for Rust.Project mention: Samsara, a safe Rust concurrent cycle collector | reddit.com/r/rust | 2023-01-04
The problem is, every single one of these half-dozen crates has at least one known major issue (including UAF), exactly like C++ implementations (which isn't surprising since it's the kind of things where the ownership isn't clear and then the borrow checker can't help us).
Heapless, `static` friendly data structuresProject mention: """may_dangle""" stabilization | reddit.com/r/rust | 2022-10-26
Rust Persistent Data StructuresProject mention: Getting both a mutable and immutable reference to a shared structure? | reddit.com/r/rust | 2022-06-13
Another option I can think of - but not completely sure how one would implement in Rust - would be to never mutate the shared state, but rather when updating it - completely swapping it out with a completely new copy of the desired state. There's lots of different ways to go about doing this - each with their own trade offs. But using some form of Persistent Data Structure would probably be a good way to start. If you only have a single writer - then I believe using a Cell and simply updating which version of the structure is being read could work. rpds seems to be a decent start to look at these sorts of structures in Rust.
Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
A better compressed bitset in RustProject mention: Roaring-rs, better-compressed bitsets, is introducing faster multiple-bitmaps operations | reddit.com/r/rust | 2022-09-06
Generic array types in Rust
Hex patterns, include patterns and magic files for the use with the ImHex Hex EditorProject mention: GitHub - WerWolv/ImHex: 🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM. | reddit.com/r/TheAmpHour | 2023-01-16
Implements a fixed-capacity stack-allocated Vec alternative backed by an array, using const generics.Project mention: Alternative for Vec for variable size arrays in no_std environment? | reddit.com/r/rust | 2022-05-17
If you're on nightly, I have a crate that I'd say would seem to be exactly what you're looking for.
Fast, efficient, and robust memory reclamation for Rust.Project mention: Seize - Fast, efficient, and robust memory reclamation for Rust. | reddit.com/r/github_trends | 2022-05-10
A library for high-performant graph algorithms. (by s1ck)Project mention: Who ranks better? Memgraph vs. NetworkX PageRank | news.ycombinator.com | 2022-11-23
This is a very interesting benchmark! I'd like to add a library to the comparison, which has recently been released.
It's called graph-mate (https://pypi.org/project/graph-mate/) and it's a wrapper around a Rust implementation for parallel graph algorithms (https://crates.io/crates/graph) that a friend and I work on.
We created a Jupyter notebook that loads the same Wikipedia articles and runs page rank with the same parameters: https://github.com/s1ck/graph/blob/d0a45116b1891daa39f493647...
Hypergraph is data structure library to create a directed hypergraph in which a hyperedge can join any number of vertices.Project mention: Hypergraph - a data structure library to generate directed hypergraphs | reddit.com/r/rust | 2022-06-01
Thanks! There's some benchmarks done here https://github.com/yamafaktory/hypergraph/blob/main/benches/performance.rs but you have to clone the project and test it locally. I can also move that to the CI workflow.
Safe, fallible, embedded-friendly ordered set/map via a scapegoat tree. Validated against BTreeSet/BTreeMap. (by tnballo)
Lock-free concurrent and single-threaded hash map implementations using Leapfrog probing. Currently the highest performance concurrent HashMap in Rust for certain use cases.Project mention: Leapfrog 0.2.0 (improved concurrent rust hashmap) | reddit.com/r/rust | 2022-03-15
I'm announcing v 0.2.0 of leapfrog (crate), which adds new features and fixes the collision problems of the previous version. The performance is slightly reduced, but not by much and the maps are still very fast.
Generic bijective maps in RustProject mention: BTreeMap but sorted by value? | reddit.com/r/rust | 2023-01-04
Your requirements may be slightly different, but you could take a look at how e.g. bimap does it.
Redux store, TUI framework, non binary tree & graph data structures, proc macros, and more in RustProject mention: [Media] TUI framework fans - I've just updated the r3bl_tui crate to v0.2.0. It now supports syntax highlighting, and compositor & double buffering for smooth rendering and no jank. It is inspired by React. https://crates.io/crates/r3bl_tui | reddit.com/r/rust | 2022-12-11
Array helpers for Rust's Vector and String types
Implementation of triple buffering in RustProject mention: Rust Is Hard, Or: The Misery of Mainstream Programming | news.ycombinator.com | 2022-06-02
Rust marks cross-thread shared memory as immutable in the general case, and allows you to define your own shared mutability constructs out of primitives like mutexes, atomics, and UnsafeCell. As a result you don't get rope to hang yourself with by default, but atomic orderings are more than enough rope to devise incorrect synchronizations (especially with more than 2 threads or memory locations). To quote an earlier post of mine:
In terms of shared-memory threading concurrency, Send and Sync, and the distinction between &T and &Mutex and &mut T, were a revelation when I first learned them. It was a principled approach to shared-memory threading, with Send/Sync banning nearly all of the confusing and buggy entangled-state codebases I've seen and continue to see in C++ (much to my frustration and exasperation), and &Mutex providing a cleaner alternative design (there's an excellent article on its design at http://cliffle.com/blog/rust-mutexes/).
My favorite simple concurrent data structure is https://docs.rs/triple_buffer/latest/triple_buffer/struct.Tr.... It beautifully demonstrates how you can achieve principled shared mutability, by defining two "handle" types (living on different threads), each carrying thread-local state (not TLS) and a pointer to shared memory, and only allowing each handle to access shared memory in a particular way. This statically prevents one thread from calling a method intended to run on another thread, or accessing fields local to another thread (since the methods and fields now live on the other handle). It also demonstrates the complexity of reasoning about lock-free algorithms (https://github.com/HadrienG2/triple-buffer/issues/14).
I find that writing C++ code the Rust way eliminates data races practically as effectively as writing Rust code upfront, but C++ makes the Rust way of thread-safe code extra work (no Mutex unless you make one yourself, and you have to simulate &(T: Sync) yourself using T const* coupled with mutable atomic/mutex fields), whereas the happy path of threaded C++ (raw non-Arc pointers to shared mutable memory) leads to pervasive data races caused by missing or incorrect mutex locking or atomic synchronization.
Inspect and recreate in-memory data structuresProject mention: ReClass rewrite in rust but with field aligning | reddit.com/r/ReverseEngineering | 2022-12-04
An efficient method of heaplessly converting numbers into their string representations, storing the representation within a reusable byte array.
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Rust Data structures related posts
BTreeMap but sorted by value?
1 project | reddit.com/r/rust | 4 Jan 2023
Introducing RangeBoundsMap, a BTreeMap-like data-structure library where the keys are RangeBounds!
2 projects | reddit.com/r/rust | 22 Dec 2022
Experienced C++ users: what do you like about Rust? How would you sell it to other C++ users?
4 projects | reddit.com/r/rust | 14 Dec 2022
ReClass rewrite in rust but with field aligning
1 project | reddit.com/r/ReverseEngineering | 4 Dec 2022
Why do I constantly feel like I'm doing something wrong by continuing using C++?
3 projects | reddit.com/r/embedded | 29 Nov 2022
1Password releases Typeshare, the "ultimate tool for synchronizing your type definitions between Rust and other languages for seamless FFI"
14 projects | reddit.com/r/rust | 22 Nov 2022
Who ranks better? Memgraph vs. NetworkX PageRank
1 project | news.ycombinator.com | 23 Nov 2022
A note from our sponsor - #<SponsorshipServiceOld:0x00007fea6016c9a0>
www.saashub.com | 4 Feb 2023
What are some of the best open-source Data structure projects in Rust? This list will help you: