Remove NASM CLI requirement
Specific Demand
Dx now optimizes images including avif images. Dx supports avif images because it is the most well supported small format that browsers support. To encode avif images, dioxus uses the image crate (https://github.com/image-rs/image/issues/1404) which in turn uses rav1e (https://lib.rs/crates/rav1e#readme-dependency-nasm) and relies on NASM on some platforms.
Implement Suggestion
Find another crate that supports avif encoding in rust without NASM or disable the NASM feature on rav1e and create our own bindings to the image crate
I was able to install NASM via winget, but I had to manually add the path to my env.
Disabling rav1e's asm feature by default, with an optional asm feature to re-enable it should work.
Perhaps this could be a plugin instead of a direct part of the CLI?
Perhaps this could be a plugin instead of a direct part of the CLI?
It could be a plugin, but you would sacrifice a lot of performance. WASM is pretty fast, but it is still ~1/2 the speed of native code. For most plugins this doesn't matter too much, but asset optimization can be compute intensive. I think we can remove the feature on rav1e that enables nasm and still be much faster than a WASM plugin.
This is fixed on MacOs and Linux but it looks like rav1e is still pulling in nasm on windows even without the asm feature enabled
Windows is fixed as well. I was running into a different caching issue with CI