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 moving Visit, VisitMut, Fold traits to separate crate(s) #1638

Open
dtolnay opened this issue May 10, 2024 · 0 comments
Open

Consider moving Visit, VisitMut, Fold traits to separate crate(s) #1638

dtolnay opened this issue May 10, 2024 · 0 comments

Comments

@dtolnay
Copy link
Owner

dtolnay commented May 10, 2024

https://docs.rs/syn/2/syn/visit/index.html
https://docs.rs/syn/2/syn/visit_mut/index.html
https://docs.rs/syn/2/syn/fold/index.html

These account for a surprisingly large proportion of the compile time of the syn crate, on the order of 31% when "parsing", "printing", and "full" features are enabled.

It is not necessary for this code to be in the same crate as the rest of syn. Each of these modules could be its own crate, which depends on syn. This would allow crates which depend on syn but do not use those traits to begin compiling sooner in a clean build.

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

No branches or pull requests

1 participant