To add to the discourse here, it's worth considering that since Elm came about WASM has come along in huge strides, and at this point you're faced with a "Why learn Elm when I can use and compile to WASM".

See projects like Yew and Blazor.

WASM is still not realistic for most apps especially if you care even a little about bundle size.

AssemblyScript produces the smallest binary and then Zig. Rust produces bloat binary by default but can be small by https://github.com/johnthagen/min-sized-rust for hello word type of app. I have no idea if the gc proposal could make those langs produce smaller binary size. That said, .wasm is generally smaller on wire and faster-to-execute on host.