3 ms·
You DO need webassembly to run C++ on the server AND client(browser) side. (unless you want to use some hacky c++ to js transpiler)
by singularity2001 6y ago
You DO need webassembly to run C++ on the server AND client(browser) side.
(unless you want to use some hacky c++ to js transpiler)
- CyberRabbi 6y agoCan you provide an example of a situation where it would make sense for both client and server to use the same build? Typically client and server play different roles and require different builds anyway.
- steego 6y agoThe point isn’t to run client code in the server and server code on the client. The point is to allow JavaScript to be able to use excellent C++/Rust code in a sandboxed environment when it makes sense. Embedding SQLite is a perfect example.
- CyberRabbi 6y ago> The point is to allow JavaScript to be able to use excellent C++/Rust code in a sandboxed environment when it makes sense. That seems useful for the client side but you don’t need webassembly to do that on the server-side. E.g. https://github.com/mapbox/node-sqlite3 https://github.com/mapbox/node-sqlite3