Open teymour-aldridge opened 4 years ago
I've made a stab at this on this branch https://github.com/teymour-aldridge/yew/tree/watt
So, instead of the users of the crate compiling to their native target when they build the crate, it would be built ahead of time and just run when the user uses the macro crate?
Wouldn't that only improve performance the first time the crate would have been built? After that the natively compiled crate would be faster, no?
Maybe I'm just not understanding the impacts of this
https://github.com/dtolnay/watt lays out more of the specifics. Generally the macro is compiled in release mode, so it's faster.
https://github.com/dtolnay/watt lays out more of the specifics. Generally the macro is compiled in release mode, so it's faster.
Would adding the following line to packages/yew/Cargo.toml
achieve a similar effect?
[profile.dev.package.yew-macro]
opt-level = 3
Because its WASM, it will work on any machine?
Is your feature request related to a problem? Please describe. A way to speed up yew-macro's compilation time would be to compile it to WebAssembly, ship the WASM binaries with the crate and then run them.
Describe the solution you'd like I imagine that this would be achieved with dtonlay's
watt
library.Describe alternatives you've considered This could initially be placed behind a feature flag.
Additional context I'd like to do this, just wondering whether it was something worth doing before writing any code!