The JavaScript Promise Integration (JSPI) - Google V8 API that bridges WebAssembly and asynchronous web. The WebAssembly JSPI API suspends a Wasm application when it issues a synchronous API call and resumes it when the asynchronous I/O operation is completed.

Some time ago I’ve written an article Node.js: In Go We Trust where described generation of WASM file built with Golang.

But nothing stays the same and in article
Introducing the WebAssembly JavaScript Promise Integration API you’ll find the description of the new API and examples with Emscripten and C/C++.

So follow me on Medium and subscribe to Tech Read channel.
Likes, shares and recommendations are welcome.

#webassembly #wasm
When Node.js is not enough

As a developer you should understand the importance of choosing the right programming language for a particular task. Node.js is a popular platform for building server-side applications using JavaScript, but sometimes we need to use other languages to take advantage of their unique features and capabilities.

Thankfully, Node.js provides several ways to integrate other programming languages into our applications. One popular approach is to use the Child Process module to spawn a child process and communicate with it through standard input/output streams. This allows us to execute external commands written in other languages and receive their output back in our Node.js application.

Another option is to use a native Node.js add-on written in another language, such as C++ or Rust, to access low-level system resources or improve performance-critical parts of our code. Node.js provides a well-documented API for building native add-ons, and there are also several community-driven tools like neon and node-ffi that simplify the process of writing and using native add-ons.

Lastly, we can also use WebAssembly, a low-level binary format designed to run in web browsers, to execute code written in other languages like C, Rust, or Go. Node.js supports WebAssembly, which allows us to load and execute WebAssembly modules directly in our Node.js applications.

Using other programming languages in Node.js can open up new possibilities and help us build more robust, performant, and scalable applications. However, it's important to choose the right approach based on our specific needs and requirements, and to carefully consider the trade-offs involved in integrating different programming languages.

To know more - subscribe to the Tech Read channel.
Also I’ll add a few links with articles about using Rust, Python and C languages with Node.js.
Likes, shares and recommendations are welcome.

#nodejs #webassembly

Links:
https://johns.codes/blog/exposing-a-rust-library-to-node-with-napirs
https://www.alxolr.com/articles/how-to-process-a-csv-file-five-times-faster-in-node-js-with-rust-and-napi-rs
https://github.com/bitair-org/linker.js