mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-14 18:12:05 +00:00
* update api-basics.md * update install.md * add placeholder for "build for web" * update js api * add more sections in js-api.md * update "coming soon" for how-to-build-web * Update "Web" -> "web" in title of web.md * Update install.md
2 KiB
2 KiB
| title | parent | grand_parent |
|---|---|---|
| JavaScript API | API docs | Reference |
ONNX Runtime JavaScript API
{: .no_toc }
ONNX Runtime JavaScript API is the unified interface used by ONNX Runtime Node.js binding, ONNX Runtime Web and ONNX Runtime for React Native.
Contents
{: .no_toc }
- TOC placeholder {:toc}
Supported Versions
- ONNX Runtime Node.js binding: Node.js v12.x+ or Electron v5.x+
- ONNX Runtime Web: mainstream modern browsers on Windows, macOS, Android and iOS.
- ONNX Runtime for React Native: TBD
Builds
Builds are published to npm and can be installed using npm install
| Package | Artifact | Description | Supported Platforms |
|---|---|---|---|
| Node.js binding | onnxruntime-node | CPU (Release) | Windows x64 CPU NAPI_v3, Linux x64 CPU NAPI_v3, MacOS x64 CPU NAPI_v3 |
| Web | onnxruntime-web | Browsers (wasm, webgl), Node.js (wasm) | |
| React Native | onnxruntime-react-native |
For Node.js binding, to use on platforms without pre-built binaries, you can build Node.js binding from source and consume using npm install <onnxruntime_repo_root>/js/node/.
API Reference
See Typescript declarations for Inference Session, Tensor and Environment Flags for reference.
See also ONNX Runtime JavaScript examples.