https://github.com/floooh/sokol
...live samples:
See for instance:
It's good that these things render flawlessly in the browser but it seems like the platform still has some work to do.
rust is stuck with "rewrite everything to be usable", it can't consume any of that
zig on the other hand.. it can, i think it'll have a bright future
I don't expect Zig to do any better or worse than Rust in this regard.
The reverse cases are sadly not that great atm. If you have a Rust application that uses SDL2 and OpenGL, for example, porting it to the Web is not that easy (you either need to port those APIs to something else, or mix Rust and C to get Emscripten's SDL2 and OpenGL support). And if you want to write new C++ code just for the Web, current bindings solutions are not polished enough.
But hopefully all those things will keep improving!