Coming from Dev.to and looking for some knowledge. Already have written some articles and possibly will do the same here.
People are welcome to let me know, if they want to learn or develop code!
Thank you, @gunjan_0307 . Are there any good reason to use this approach? Because if you want to run JavaScript without a browser, you can just use NodeJS.
Nick Vidal is the Community Manager of Profian and the Enarx project, which is part of the Confidential Computing Consortium (Linux Foundation). Previously, he was the Director of Community at the OSI
That's a good question, @webcoder. So one key reason would be security. Since WebAssembly uses a sandbox model, you can prevent a malicious or buggy JavaScript application from compromising the host. Other reasons might be performance and portability. Depending on the application, it might be faster to run the WebAssembly code directly (no Nodejs overhead). As for portability, you might run this same application anywhere without recompilation (server, client, edge, IoT, whatever).
Thank you, @gunjan_0307 . Are there any good reason to use this approach? Because if you want to run JavaScript without a browser, you can just use NodeJS.
That's a good question, @webcoder. So one key reason would be security. Since WebAssembly uses a sandbox model, you can prevent a malicious or buggy JavaScript application from compromising the host. Other reasons might be performance and portability. Depending on the application, it might be faster to run the WebAssembly code directly (no Nodejs overhead). As for portability, you might run this same application anywhere without recompilation (server, client, edge, IoT, whatever).
For me, it was simply getting byte code off my JavaScript files, it's like dream comes true.
@nick Thanks for so good explanation. :)