Is there any way to print text onto the window directly in web assembly instead of having to pass string data into javascript, or print to the console?
No. WebAssembly can't directly manipulate the DOM yet. For now you must use Javascript glue. It is a planned future feature however.
You may try to draw text with OpenGL, by using OGLFT or similar library.
The answer is still no, and it will remain no. It is central to the design of Wasm that it does not have any built-in functionality that depends on a given environment (because it is intended to be embeddable in many different environments) or that gives Wasm code the capability to manipulate its environment other than through explicit imports (because that would break the ability to sandbox a Wasm module).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With