-2

Understand that WebAssembly code can be executed at near-native speed across different platforms and that it can be run in modern web browsers.

Other than the above reasons (portability, performance) and perhaps security reasons, why would someone want to run their existing go/rust/c++ applications in web browsers?

Just thought that what should run in web browsers should continue to run in web browsers (i.e., javascript/typescript) and what should run on systems should continue to run on systems (Rust, Go, C/C++)

Nathan Aw (Singapore)

Nathan Aw
  • 545
  • 5
  • 18

1 Answers1

1

One reason is that they may have an application or library and they don't want to rewrite in Javascript. For example, if they have already made a game in a systems language and they want people on the web to be able to play it, they won't want to rewrite in javascript.

Javascript can be rather annoying to use in very large projects because it wasn't really designed for them. It might just be easier to write good code in a different language.

me'
  • 494
  • 3
  • 14
  • I would add that JavaScript in the browser is likely not going to be as performant as a systems language compiled to Wasm for some workloads. – Martin May 31 '20 at 11:26
  • agreed. however, there are so many other implications with running in a web browser. am not sure where that is heading. With all the applications running in a web browser, am not sure if the OS is still relevant in the not-so-distant future – Nathan Aw May 31 '20 at 11:57