The progress of Node.js support in WasmEdge QuickJS is tracked in this issue.
There are two approaches for supporting Node.js APIs in WasmEdge QuickJS.
- The querystring functions just perform string manipulations.
- The buffer functions manage and encode arrays and memory structures.
- The encoding and http functions provide a Node.js
Other Node.js functions must be implemented in Rust using the internal_module approach. There are two reasons for that. First, some Node.js API functions are CPU intensive (e.g., encoding) and is most efficiently implemented in Rust. Second, some Node.js API functions require access to the underlying system (e.g., networking and file system) through native host functions.
- The core module provides OS level functions such as
- The encoding module provide high-performance encoding and decoding functions, which is in turn wrapped into Node.js encoding APIs.
Node.js compatibility support in WasmEdge QuickJS is a work in progress. It is a great way for new developers to get familiar with WasmEdge QuickJS. Join us!