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

Modularizes gloo #333

Merged
merged 1 commit into from
Jun 4, 2023
Merged

Modularizes gloo #333

merged 1 commit into from
Jun 4, 2023

Conversation

xfbs
Copy link
Contributor

@xfbs xfbs commented May 9, 2023

This turns the individual subcrates into optional features. By default, all features are enabled, to ensure this change is not a breaking change. But if needed, default features can be turned off and only the modules needed enabled.

This turns the individual subcrates into optional features. By default,
all features are enabled, to ensure this change is not a breaking
change. But if needed, default features can be turned off and only the
modules needed enabled.
@ranile
Copy link
Collaborator

ranile commented May 25, 2023

Thanks for the PR! I have to ask: why make this change? Depending upon the individual crates is always an option

@xfbs
Copy link
Contributor Author

xfbs commented May 31, 2023

Hey!

I can try to explain:

Basically, right now with gloo you either get everything or nothing (you have to manually import crates). Often times it would be convenient to import gloo and have something in-between. For example get gloo with the net, timers and events features. Somewhat like tokio (where you would enable fs and sync features).

Especially in WASM where you are trying to get small binaries (because they load through the browser) you often don't want to blindly import everything (although, to be fair, wasm-opt seems to be doing a really good job of throwing stuff that isn't used out).

If you think this does not make sense, feel free to disregard it. I would like for gloo to be modular like this, but it is not really "necessary", just a way for lazy people like me to use gloo without needing to add many manual imports!

Cheers,
-Patrick

@ranile ranile self-requested a review June 4, 2023 17:34
Copy link
Collaborator

@ranile ranile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable

@ranile ranile merged commit b8e0045 into rustwasm:master Jun 4, 2023
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 this pull request may close these issues.

2 participants