strum
goblin
Our great sponsors
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.
strum
-
What are some common verbose code patterns in rust and unique ways to reduce the said verbosity?
Take a look at the strum crate. https://crates.io/crates/strum
-
Published my first Crate today to map Environment Variables to Enums
I would be use something like https://github.com/Peternator7/strum if I need map string to enum and serde is not the option.
-
Two-way alternative to enum_kinds crate?
Looks like proper support for this in strum has been proposed.
-
Best way of associating enums with values?
This crate can generate an iterator for you using a macro https://github.com/Peternator7/strum
-
Hey Rustaceans! Got a question? Ask here (4/2023)!
The strum crate is also good for removing this kind of boilerplate, and worth checking out!
-
What are some less popular but well-made crates you'd like others to know about?
strum is among my favorite crates to recommend. Favorites of this crate include EnumProperty and EnumIter
-
What's everyone working on this week (45/2022)?
I released my first crate that provides a derive macro to easily obtain a name of a current variant in an enum as a string. I did it mostly to learn about procedural macros and the process of releasing a crate. I then found out there is strum which does this and much more. Nonetheless, I learned a lot and I found couple of nice tools like ```cargo-release and git-cliff.
-
Hey Rustaceans! Got a question? Ask here! (33/2022)!
I used https://crates.io/crates/strum to iterate over the enum variants, otherwise you'd have to hardcode the list of variants and wouldn't gain anything.
-
Questions about enums
If you chose to go with the "derive a trait" route the strum crate might be what you're looking for. It lets you use derive to add information about variant count, discriminants or even iterators over variants to an enum.
-
Match enum with String
You might want something like strum
goblin
-
[ANN] yabridge 4.0, with chainloading, an overhauled backend, and many user experience improvements
On the backend side, a lot has changed. The biggest change is that the dependency on Boost has been completely removed, and everything has been reworked accordingly. This should make packaging easier, as yabridge now no longer depends on any system library other than the basic libraries needed to interact with X11. Some parts of Boost have been replaced by other headers-only libraries, while other parts now simply use custom implementations. All of this is explained in more detail in the 'Packaging notes' section of the changelog. Yabridgectl also lost its dependency on winedump, at least in most cases. It now tries to parse plugin libraries directly using the goblin binary parsing library. This should also speed up the syncing process. I did, however, run into one plugin that this new parser couldn't handle. If that happens then winedump will still be used instead.
-
Crash reporting in Rust
For now the minidump creation is a fairly faithful port of the Breakpad code, but like I said some of that code is really old, so there's probably cases where taking a step back and rethinking the approach based on new kernel or OS capabilities or, instead of recreating process snapshotting for each non-Windows, just have a really good parser for each OSes crash format that does a transform. Rust is a fantastic language for writing those kinds of parsers, so that would definitely be an interesting avenue to investigate, especially since in the Linux case a lot of groundwork has already been done by goblin.
-
What's your favourite under-rated Rust crate and why?
I do security-related projects in Rust, and goblin has been my go-to crate for any type of binary parsing (ELF/PE/Mach-O).
What are some alternatives?
enum-map
pwninit - pwninit - automate starting binary exploit challenges
serde-plain - A serde serializer that serializes a subset of types into plain strings
autocxx - Tool for safe ergonomic Rust/C++ interop driven from existing C++ headers
enum-iterator - Tools to iterate over all values of a type
eve-echoes-tools - Collection of tools helping in reverse engineering Eve Echoes
rust-djangohashers - A Rust port of the password primitives used in Django Project.
LIEF - LIEF - Library to Instrument Executable Formats
sonyflake-rs - 🃏 A distributed unique ID generator inspired by Twitter's Snowflake.
binary-security-check - Moved: https://codeberg.org/koutheir/binary-security-check
redbpf - Rust library for building and running BPF/eBPF modules
netease-messiah-tools - Tools working with files in NetEase's Messiah Engine (Primarily aimed towards Diablo Immortal for now)