Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

w4 watch for Rust uses debug build #784

Open
hw762 opened this issue Dec 11, 2024 · 3 comments
Open

w4 watch for Rust uses debug build #784

hw762 opened this issue Dec 11, 2024 · 3 comments

Comments

@hw762
Copy link

hw762 commented Dec 11, 2024

Running w4 watch uses cargo build to rebuild, which is the debug build and generates warning about oversize. It should probably use the release build.

@majaha
Copy link
Contributor

majaha commented Dec 11, 2024

Hmm, is this really a problem? It's okay to be oversized during development.

@hw762
Copy link
Author

hw762 commented Dec 11, 2024

I would like to keep track of the size in development. Well, I can build the release and check myself, but this can be automated.

@JerwuQu
Copy link
Contributor

JerwuQu commented Dec 13, 2024

The w4 watch command is mostly targeted at fast development, and for development it's generally useful to have debug symbols available.
I'd suggest having a script that automatically builds in release with wasm-opt if you want to keep accurate track of the final size.
You could also override the dev/debug profile in your Cargo.toml if you always want to build an optimized binary even with cargo build (and cargo build --debug), though I wouldn't recommend it, and it isn't really useful without wasm-opt either.

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

No branches or pull requests

3 participants