leptos-rs / cargo-leptos

Build tool for Leptos (Rust)
MIT License
370 stars 107 forks source link

Allow wasm-opt args to be configured #269

Open unlinking opened 8 months ago

unlinking commented 8 months ago

In order to better solve compatibility issues

https://github.com/leptos-rs/leptos/discussions/2458

https://github.com/leptos-rs/cargo-leptos/blob/a44839eee131502b6faf398f1004d8918b999225/src/compile/front.rs#L166

94bryanr commented 4 months ago

Would also like to see this. I have a project where the debug build runs too slow to be usable but the release build takes too long to compile. I'd like to be able to use the mid-level optimizations from wasm-opt instead of having to decide between fully optimized and not optimized at all.

benwis commented 4 months ago

@94bryanr I'm currently in the process of rewriting this tool, would the ability to choose one of these OptimizationOptions be sufficient? We're looking to move away from this and use the lib interface https://docs.rs/wasm-opt/0.116.1/wasm_opt/#using-the-library