Skip to content

specifically exclude icons in wasm (for now) #551

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

Open
NoSanityHere opened this issue Apr 29, 2025 · 0 comments
Open

specifically exclude icons in wasm (for now) #551

NoSanityHere opened this issue Apr 29, 2025 · 0 comments

Comments

@NoSanityHere
Copy link

NoSanityHere commented Apr 29, 2025

I noticed that icons are about to become a lot easier with this pr, and i while i know icons in wasm are planned, in the meantime i think the icon shouldn't be included in wasm builds to reduce size.
this works: (I'm assuming android and ios don't support icons because it isn't documented and i doubt they would work)

        #[cfg(not(any(target_arch = "wasm32", target_os = "android", target_os = "ios")))] 
        icon: Some(get_icon()),
        #[cfg(any(target_arch = "wasm32", target_os = "android", target_os = "ios"))]
        icon: None,

but isnt particularly pretty, and one of the goals listed is 'Cross platform. Amount of platform specific user code required should be kept as little as possible.'
Personally i would simply add a macro, where you can simply provide an icon file path, and something similar to above is used, but there might be a cleaner way

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

No branches or pull requests

1 participant