inlinable-dyn-extension-traits
An exploration into the various ways optional trait methods can be implemented in Rust. (by daniel5151)
intertrait
A library providing direct casting among trait objects implemented by a type (by CodeChain-io)
Our great sponsors
inlinable-dyn-extension-traits | intertrait | |
---|---|---|
4 | 1 | |
23 | 38 | |
- | - | |
0.0 | 0.0 | |
over 3 years ago | over 1 year ago | |
Rust | Rust | |
- | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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.
inlinable-dyn-extension-traits
Posts with mentions or reviews of inlinable-dyn-extension-traits.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-01-20.
-
gdbstub 0.6: An ergonomic, #![no_std] implementation of the GDB Remote Serial Protocol in Rust - now with async support!
In the meantime, you could check out daniel5151/optional-trait-methods for some chicken-scratch notes + exploration on IDETs, including some code samples which you can throw right into godbolt.org to see how well they optimize.
-
Post-Monomorphization Dead Code Elimination and Other Unwritten Blog Posts
Funny enough, I've also been meaning to write a full blog post about it, but haven't found the time! In the meantime, I've got a rough overview of this technique as part of the gdbstub docs, and I've got a WIP repo of example code and exploratory notes that explores the technique in more detail (along with comparing it with alternative approaches)
-
Rust 2030 Christmas list: Better cfg
Also, check out daniel5151/optional-trait-methods if you haven't already (I point to it near the end of the gdbstub documentation I linked). It's a very rough overview of all the various techniques I considered before landing on IDETs, and includes several simplified examples of how the resulting APIs might work from a implementation and user's perspective.
-
Designing a new architecture for Rspotify based on trait inheritance, need opinions
I've spent quite a bit of time staring at assembly output and performing in-application testing to make sure that optimizations were being triggered as expected.
intertrait
Posts with mentions or reviews of intertrait.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-03-14.
-
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.
What are some alternatives?
When comparing inlinable-dyn-extension-traits and intertrait you can also consider the following projects:
gdbstub - An ergonomic, featureful, and easy-to-integrate implementation of the GDB Remote Serial Protocol in Rust (with no-compromises #![no_std] support)
binrw - A Rust crate for helping parse and rebuild binary data using ✨macro magic✨.