-
-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify serde_derive platform support #2574
Comments
I'm also quite irritated that this way was chosen instead of e.g. compiling the macro into some form of byte-code like WASM or such (which wouldn't have the platform support problems to such an extent), while still providing some form of build speedup (as I suppose that the build time of serde_derive is the problem). |
Compiling to bytecode would make little sense, because then a bytecode interpreter must be shipped in addition to serde-derive, which would itself most certainly take even longer to compile. |
There's https://github.com/dtolnay/watt and readme suggests that compiling a bytecode interpreter is faster than complex macro with dependencies, what's more - it uses |
watt would work for my use-case (cargo2nix), but it is still incompatible with corporate or distro policy |
Thanks for clarifying the unclear wording — this specifically refers to platforms on which cargo build involves the precompiled implementation in the first place. The crate works on all host platforms on which rustc supports proc macros; not all of those involve a precompiled macro. It also only refers to support extended by a serde maintainer. Support obtained from elsewhere (notably distro packagers) would be free to support different build modes, as always. |
Originally posted by @dtolnay in #2538 (comment)
This does seem to imply that platforms where the precompiled implementation is not available are not officially supported. However the rust compiler, which uses serde_derive, is supported on many platforms, most of which are listed in the rust documentation.
The text was updated successfully, but these errors were encountered: