intertrait
binrw
intertrait | binrw | |
---|---|---|
1 | 3 | |
38 | 486 | |
- | - | |
0.0 | 8.1 | |
over 1 year ago | 15 days ago | |
Rust | Rust | |
Apache License 2.0 | MIT License |
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.
intertrait
-
Post-Monomorphization Dead Code Elimination and Other Unwritten Blog Posts
There are some external libraries that downcasting between trait objects (e.g: intertrait), though these all use require some external runtime checking / linker shenanigans, which means they aren't amenable to the dead-code-elimination optimizations that make OPs technique work.
binrw
-
How to write deserializer for custom binary protocol?
Serde can work but won't be easy, because It wants to deserialize everything. Take a look at the binrw crate(https://github.com/jam1garner/binrw) and define your binary layout with It, then you can actually create a wrapper which reads the file from any reader(be it a Cursor over the mmap'd slice or a file).
- Kaitai Struct: A new way to develop parsers for binary structures
-
Post-Monomorphization Dead Code Elimination and Other Unwritten Blog Posts
Sure! The commit is here (I haven’t pushed the version of this commit I made on binread itself but the actual changes are identical)
What are some alternatives?
inlinable-dyn-extension-traits - An exploration into the various ways optional trait methods can be implemented in Rust.
nom - Rust parser combinator framework
wuffs - Wrangling Untrusted File Formats Safely
hachoir - Hachoir is a Python library to view and edit a binary stream field by field
restruct - Rich binary (de)serialization library for Golang
Kaitai Struct - Kaitai Struct: declarative language to generate binary data parsers in C++ / C# / Go / Java / JavaScript / Lua / Nim / Perl / PHP / Python / Ruby
Grammars - Grammars for Synalyze It! and Hexinator
smm2-documentation - Documentation for the game Super Mario Maker 2.
deku - Declarative binary reading and writing: bit-level, symmetric, serialization/deserialization
FortniteReplayDecompressor - Read Fortnite replay files
nomicon - The Dark Arts of Advanced and Unsafe Rust Programming