rust-phf
patterns
rust-phf | patterns | |
---|---|---|
15 | 63 | |
1,721 | 7,699 | |
0.9% | 1.1% | |
4.8 | 7.5 | |
about 1 month ago | 10 days ago | |
Rust | Handlebars | |
MIT License | Mozilla Public License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rust-phf
-
Railwind 0.1.2 - A Tailwind compiler rewritten in Rust
could you create compile-time maps with https://github.com/rust-phf/rust-phf ? that way you don't pay the performance penalty of reading the ron files at runtime
-
Static reference to generic implementation
However I'm still stuck for the matching between packet and handler. Phf map (static maps) doesn't support mapping to enum so I have to make a matching clause :
-
What's everyone working on this week (4/2023)?
Have you seen the crate phf?
-
Hey Rustaceans! Got a question? Ask here! (37/2022)!
Maybe phf will come handy?
-
const string memory usage question
This is sort of an aside, but turning a not small index into a match statement is probably going to use more memory than the base data and suck for compile time. Might be smarter to include the index as bytes for ex with include! and interpret it directly. You could precompile a hash table with something like rust-phf: https://github.com/rust-phf/rust-phf.
-
How to pass data from build script to binary crate?
A great example of how this is typically done is the phf crate: https://github.com/rust-phf/rust-phf
-
Be still my static heart
https://github.com/rust-phf/rust-phf comes to mind.
-
How does Rust implement matching against strings?
If you’re looking for something like gperf: https://github.com/rust-phf/rust-phf
- Announcing Rust 1.56.0 and Rust 2021
-
Memory efficient hashmap?
Are all the keys known at compile-time? If so https://github.com/rust-phf/rust-phf might be best.
patterns
- Best practices for designing traits in public crates?
-
Ask HN: Learning new coding patterns – how to start?
For OOP design patterns in Rust, see: https://rust-unofficial.github.io/patterns/
For a book on FP, see: https://www.manning.com/books/grokking-simplicity
- Haskell mini-patterns handbook (2020)
- Is there any site with Dos and Don'ts in Rust?
-
Functional Options Pattern in Go and Rust
Just wanting to let this here for some further input: - https://rust-lang.github.io/api-guidelines/ - https://rust-unofficial.github.io/patterns/ - https://deterministic.space/elegant-apis-in-rust.html
-
Rust exercices for tech interview
Rust Design Patterns
-
I want some help learning design patterns
I know about Rust Design Pattern what are your reviews for the same?
-
I've been writing C# for nearly a decade, but I want to learn how to build programs with Rust. What do I need to change about how I structure my code?
Once you've finished with The Book and possibly Programming Rust, 2nd Edition if you've got the cash for a paid book, read Learning Rust With Entirely Too Many Linked Lists (it helps to solidify what ownership and borrowing mean for data structures) and Rust Design Patterns.
-
Is there a coding style and set of best-practices that avoid (not bypass) "fighting the borrow checker"?
Well, there's https://rust-unofficial.github.io/patterns/ for a start.
-
Comprehensive Rust 🦀 is now available in Korean!
Love the translation pipeline, currently looking into adopting that as well for the Rust patterns book!
What are some alternatives?
parallel-hashmap - A family of header-only, very fast and memory-friendly hashmap and btree containers.
nomicon - The Dark Arts of Advanced and Unsafe Rust Programming
bumpalo - A fast bump allocation arena for Rust
rust-typed-builder - Compile-time type-checked builder derive
string-cache - String interning for Rust
too-many-lists - Learn Rust by writing Entirely Too Many linked lists
rust - Empowering everyone to build reliable and efficient software.
book - The Rust Programming Language
sharded - Safe, fast, and obvious concurrent collections in Rust.
idiomatic-rust - 🦀 A peer-reviewed collection of articles/talks/repos which teach concise, idiomatic Rust.
rust - Rust for the xtensa architecture. Built in targets for the ESP32 and ESP8266
vulkano - Safe and rich Rust wrapper around the Vulkan API