carloskiki / leptos-icons

An icon library for the leptos web framework
MIT License
84 stars 16 forks source link

Feature gate icons #46

Open Stefanuk12 opened 4 months ago

Stefanuk12 commented 4 months ago

As you have acknowledged, having so many icons causes rust-analyzer to lag. To fix this, you can gate each icon into its own feature flag. If you reach over the maximum features, you can group icons instead and do it that way.

carloskiki commented 4 months ago

Yes, this crate is the cause which instigated limits on crate features: https://blog.rust-lang.org/2023/10/26/broken-badges-and-23k-keywords.html.

The only obvious way I see of partitioning icons with feature flags would be on a per-library basis. This feels somewhat of a coarse grain method, but I could get behind it as it will improve UX.

If you have time, I would encourage you to open a PR and try your hand at implementing per-library features. I would be happy to review it :), but I do not have the time to implement it myself.