microsoft / microsoft/onnxruntime

[js][feature tracking] JavaScript library consume

Open
#14,529 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation feature request platform:web
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

This issue is for tracking tasks and separated issues that related to JavaScript library consumption. This includes TODO items, known issues and feature works that affect any forms of consuming ONNX Runtime JavaScript API via the following library:
- onnxruntime-web
- onnxruntime-node
- onnxruntime-react-native

## Work items tracking table

Works to be done for ORT-Web:
1. support ES6 export. #10913
- currently the "module" field is not working in js/web/package.json. Need to:
a. switch to ES module for webassembly
b. use standard module export
c. make webpack behavior correct
2. support loading from worker/audio worklet. #12589 #13072
3. support service worker. #14445
4. support electron #13933
5. support export for Node.js
6. update package.json ([exports field](https://webpack.js.org/guides/package-exports/)) so that different projects can consume onnxruntime-web with minimal modification to its webpack configuration. #13736

Works to be done for ORT-Node:
1. support GPU EP (Cuda/DML/...) #14127
2. electron compatibility #13086

## Example tracking table
The following table is used to track tasks for updating examples to consume ONNX Runtime JavaScript API

Category | Status | Description | PR/Issue # | Comments
------ | ------ | ------- | ------ | -----
onnxruntime-node | Need update version | JavaScript / CommonJS / No_Bundler | | [link](https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js/quick-start_onnxruntime-node)
onnxruntime-node | Not started | JavaScript / ESModule / No_Bundler | |
onnxruntime-node | Not started | JavaScript / CommonJS / Webpack | | Webpack does not deal with node native modules correctly #14505
onnxruntime-node | Not started | JavaScript / ESModule / Webpack | |
onnxruntime-web | Need update version | JavaScript / Web / scriptTag | | [link](https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js/quick-start_onnxruntime-web-script-tag)
onnxruntime-web | Need update version | JavaScript / Web / CommonJS / Webpack | | [link](https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js/quick-start_onnxruntime-web-bundler)
onnxruntime-web | Not started | JavaScript / Web / ESModule / Webpack | | not working #14504
onnxruntime-web | Not started | JavaScript / Node / CommonJS / No_Bundler | | multi-thread CPU EP not available for onnxruntime-web in Node.js binding
onnxruntime-web | Not started | JavaScript / Node / ESModule / No_Bundler | | ESModule not available for onnxruntime-web in Node.js binding
onnxruntime-web | Not started | JavaScript / Node / CommonJS / Webpack | |

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This is an umbrella tracker rather than a single change. Start with the linked sub-issue for one selected work item, then inspect js/web/package.json and the corresponding example under onnxruntime-inference-examples/js. Done means the chosen sub-issue is completed and its tracking or example status is updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript, node.js, react-native, wasm, webpack
Domain
api, developer-experience, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.