serde-aux
An auxiliary serde library providing helpful functions for serialisation and deserialisation for containers, struct fields and others. (by iddm)
ref-cast
Safely cast &T to &U where the struct U contains a single field of type T. (by dtolnay)
serde-aux | ref-cast | |
---|---|---|
1 | 3 | |
144 | 174 | |
- | - | |
6.0 | 7.4 | |
12 days ago | 25 days ago | |
Rust | Rust | |
MIT License | 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.
serde-aux
Posts with mentions or reviews of serde-aux.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-30.
-
Hey Rustaceans! Got a question? Ask here (5/2023)!
If you want to additionally parse strings into numbers, take a look at https://github.com/vityafx/serde-aux (or write a custom deserializer, ofc.).
ref-cast
Posts with mentions or reviews of ref-cast.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-30.
-
create a &Struct for a &Value
Yes, that's possible if you use repr(transparent). And as always David Tolnay has a crate for that: https://github.com/dtolnay/ref-cast
-
When Rust hurts
Actually you can, as long as the newtype struct has #[repr(transparent)]. The ref-cast crate makes it easy to do this without having to (directly) use unsafe code!
-
Hey Rustaceans! Got a question? Ask here (5/2023)!
You can add #[repr(transparent)] and then call transmute(), or use https://github.com/dtolnay/ref-cast (which is exactly what it does anyway, providing a safe interface).
What are some alternatives?
When comparing serde-aux and ref-cast you can also consider the following projects:
jlox-rs - Following along the first (Java) part of https://craftinginterpreters.com/, but with Rust, because reasons.
rust-bindgen - Automatically generates Rust FFI bindings to C (and some C++) libraries.
rust - Empowering everyone to build reliable and efficient software.
kanin - A microservice framework for AMQP, protobuf and Rust.
tokio-tungstenite - Future-based Tungstenite for Tokio. Lightweight stream-based WebSocket implementation
auto-future - A way to easily build structs that can be turned into futures
text_adventure - Prototype for a text based adventure system.
rustfmt - Format Rust code
cxx - Safe interop between Rust and C++
wabt - The WebAssembly Binary Toolkit
moonlander-firmware