How to print text in web assembly

Is there a way to print the text in a window directly in the web assembly instead of passing the string data to javascript or printing to the console?

+5
source share
3 answers

No. WebAssembly cannot directly manipulate the DOM. At this point, you should use Javascript glue. However, this is a planned future feature .

+4
source

The answer is still no, and it will not remain. For Wasm design, it is important that it does not have built-in functions that depend on the given environment (since it is designed to be embedded in different environments), or that gives the Wasm code the ability to manage its environment, except through explicit import (because it would break the ability sandboxes to the Wasm module).

+1
source

You can try to draw text using OpenGL using OGLFT or a similar library.

0
source

Source: https://habr.com/ru/post/1269612/


All Articles