
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
onnxruntime-node
Advanced tools
ONNX Runtime Node.js binding enables Node.js applications to run ONNX model inference.
Install the latest stable version:
npm install onnxruntime-node
Install the nightly version:
npm install onnxruntime-node@dev
Refer to ONNX Runtime JavaScript examples for samples and tutorials.
ONNXRuntime works on Node.js v16.x+ (recommend v20.x+) or Electron v15.x+ (recommend v28.x+).
The following table lists the supported versions of ONNX Runtime Node.js binding provided with pre-built binaries.
| EPs/Platforms | Windows x64 | Windows arm64 | Linux x64 | Linux arm64 | MacOS x64 | MacOS arm64 |
|---|---|---|---|---|---|---|
| CPU | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| WebGPU | ✔️ [1] | ✔️ [1] | ✔️ [1] | ❌ [2] | ✔️ [1] | ✔️ [1] |
| DirectML | ✔️ | ✔️ | ❌ | ❌ | ❌ | ❌ |
| CUDA | ❌ | ❌ | ✔️[3] | ❌ | ❌ | ❌ |
| CoreML | ❌ | ❌ | ❌ | ❌ | ✔️ | ✔️ |
To use on platforms without pre-built binaries, you can build Node.js binding from source and consume it by npm install <onnxruntime_repo_root>/js/node/. See also instructions for building ONNX Runtime Node.js binding locally.
Right now, the Windows version supports WebGPU execution provider and DML execution provider. Linux x64 can use CUDA and TensorRT.
To use CUDA EP, you need to install the CUDA EP binaries. By default, the CUDA EP binaries are installed automatically when you install the package. If you want to skip the installation, you can pass the --onnxruntime-node-install=skip flag to the installation command.
npm install onnxruntime-node --onnxruntime-node-install=skip
You can also use this flag to specify the version of the CUDA: (v11 or v12) CUDA v11 is no longer supported since v1.22.
License information can be found here.
TensorFlow is an open-source platform for machine learning. It provides a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML, and developers easily build and deploy ML-powered applications. Unlike onnxruntime-node, TensorFlow is not limited to ONNX models and offers a broader range of functionalities including model training.
ml5.js is a friendly high-level interface to TensorFlow.js, designed to make machine learning accessible to a broad audience. It provides pre-trained models and simplifies the process of integrating machine learning into web applications. Compared to onnxruntime-node, ml5.js is more focused on ease of use and accessibility, particularly for beginners and educators.
FAQs
ONNXRuntime Node.js binding
The npm package onnxruntime-node receives a total of 5,290,560 weekly downloads. As such, onnxruntime-node popularity was classified as popular.
We found that onnxruntime-node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.