4 ms·
Serde is a Rust library for serialization. serde_derive allows creating serialzers/deserializers automatically by marking structs. It uses Rust's procedural mac
by __s 3y ago
Serde is a Rust library for serialization. serde_derive allows creating serialzers/deserializers automatically by marking structs. It uses Rust's procedural macros to generate code at compile time. Rust compiles procedural macros at compile time before compiling rest of code. To speed up compillation of code using serde_derive, a recent change was made to implement the procedural macros with a precompiled binary
- DoesntMatter22 3y agoSo is this just because server is known to make rust really slow to build? I'm curious why rust doesn't just compile your binaries once and then you wouldn't have to compile them on each build
- Sprocklem 3y agoIt generally does cache built crates for future builds on the same system, so it is usually only the initial build on a given system and the build after dependencies are updated that requires rebuilding serde_derive. I honestly don't know why they thought it was worth doing.
- earthling8118 3y agoIt very much does this. The compile times are hardly a concern to the vast majority of rust devs in part because of that cache.