this post was submitted on 18 Aug 2023
92 points (98.9% liked)
Rust
5965 readers
16 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'm not sure I follow what that link has to do with this, though.
serde
is open source, anyone can go compile it themselves. In fact, from what I can tell, to get the precompiled version ofserde_derive
, you need to compile it yourself anyway. Compiling these proc-macros to binaries before executing the code isn't new, this is what Cargo does with all proc macros.Also, I might be misreading the source here, but it looks like the executable needs to be manually compiled by the user on their own (by running the
precompiled/build.sh
script), and they need to manually add the precompiled variant ofserde_derive
as a dependency instead of using the version that's on crates.io. Am I missing something here? Is this automatically used by the published version ofserde
somewhere?No,
serde_derive
contains the binary and if you are on linux it will try to run it without asking the user. In fact there's no way to make it so it won't run.