Skip to content
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

Consider removing derive_more dependency for serde_v8 #640

Closed
svix-jplatte opened this issue Mar 6, 2024 · 1 comment · Fixed by #650
Closed

Consider removing derive_more dependency for serde_v8 #640

svix-jplatte opened this issue Mar 6, 2024 · 1 comment · Fixed by #650

Comments

@svix-jplatte
Copy link
Contributor

svix-jplatte commented Mar 6, 2024

This dependency is only used to derive trivial Deref, DerefMut, AsRef and AsMut implementations. However, it requires 3.3s to compile on my machine and much more if you count all its dependencies.

Would you accept a PR that replaces these derives with hand-written (or macro_rules!-produced) implementations?

Related: denoland/rust-urlpattern#47

@bartlomieju
Copy link
Member

Hey @svix-jplatte, thanks for spotting this. We will definitely accept a PR that removes derive_more in favor of using a hand rolled solution.

mmastrac pushed a commit that referenced this issue Mar 8, 2024
I found some of the generated impls like [this
one](https://docs.rs/serde_v8/latest/serde_v8/struct.BigInt.html#impl-AsMut%3C__AsMutT%3E-for-BigInt)
quite weird so I removed or replaced them with different ones, as seemed
reasonable in the specific cases.

Let me know what you think. The individual commit messages have more
details on why I chose certain replacements.

Closes #640.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants