When comparing the previous two main approaches — pure JavaScript implementation and traditional C implementation binding — WebAssembly offers a unique combination of advantages. It provides excellent performance while maintaining the best compatibility with modern JavaScript runtimes.
| Javascript Implementation | Traditional C Binding | WebAssembly | |
|---|---|---|---|
| Parsing Speed | Average[1] | Fast | Fast |
| C/C++ Toolchain at Runtime | Not required | Required[2] | Not Required |
| Prebuilt Binaries | N/A | One for each OS / Runtime / Arch | Universal for all |
| Prebuilt Binary Compatibility | N/A | May be broken across libc versions | Very Good |
| Browser Compatibility | Yes | No | Yes |
Due to the usage of WebAssembly, ES module and top level await etc, this library requires the minimum version of the following environments,
| Environment | Version |
|---|---|
| Node.js | v18+ |
| Chrome | V89+ |
| Edge | V89+ |
| Safari | v15+ |