I think it depends on how you compile it i think. for example,you can use SDL or something with an emscripten compiler flag [1]. but i am not super sure how that works without canvas, i haven't tried it with normal sdl
web assembly is not necessarily just for the browser though. you can have webassembly without any web[2], just to run binaries across different platforms. i think it's pretty cool