JavaScript developers can benefit from WebAssembly and WasmEdge Runtime in two important ways. You can run JavaScript programs in the WasmEdge container, or call external functions, written in multiple programming languages, from Node.js applications. Get started by installing WasmEdge or using the WasmEdge development Docker.
Run JavaScript programs in WasmEdge
WebAssembly is a ploygot runtime that supports many front-end programming languages. You can run JavaScript programs efficiently and safely across all OS and hardware platforms WasmEdge supports. WasmEdge JavaScript applications can be easily managed by container tools such as Kubernetes without the overhead of Docker, guest Linux, Node.js and v8. They can be safely embedded into other host applications (e.g., a SaaS written in Go). WasmEdge also allows developers to write high-performance and safe JavaScript APIs using languages like Rust and C.
Tutorials:
- Running JavaScript programs in WasmEdge. It supports ES6 and CommonJS (CJS) and NPM modules.
- Creating high-performance JavaScript APIs using Rust. An example is WasmEdge's high performance Tensorflow inference API for JavaScript.
- Calling C native library functions safely from JavaScript via WasmEdge.
If you are interested in contributing to the WasmEdge JavaScript runtime, please get in touch via this GitHub repo!
Embed WasmEdge in Node.js applications
WasmEdge enables Node.js applications to embed and call functions written in different languages, including Rust, Swift, Kotlin, C/C++, and TinyGo. That is enabled via Node.js extensions. The wasmedge-core NPM package (source code) enables standard WasmEdge Runtime support. The wasmedge-extensions package (source code) further enables image processing and tensorflow inference APIs in WasmEdge.
Tutorials:
- Calling Rust functions from Node.js via WasmEdge
- A Node.js WasmEdge application for image classification using Tensorflow