Right but unless I miss something it will break the current js_of_ocaml
model which basically takes any OCaml bytecode to the browser (modulo C primitives/libraries).
This is a very good user experience as library authors do not need to care about JavaScript compilation. If you need to start tracking which libraries do use effects and does who don’t and live in the fear a library author might start to use them in the next version this is no longer nice :–)
Another thing is that according to what was answered to me here, accessing what you are actually interested in accessing when you compile for the browser – that is the browser APIs – doesn’t seem obvious/streamlined yet. I gather WASM is new and thus cool and all that, but without a good FFI to the browsers API it’s just a useless gimmick to me.