microsoft / microsoft/onnxruntime

[Feature Request] Add a way to load ort-node binaries from an arbitrary path

Open
#15,136 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

### Describe the feature request

When bundling onnxruntime-node as part of a VS Code extension using Webpack, the Node binaries are loaded from `path.join(__dirname, 'node_modules', 'onnxruntime-node', 'bin', 'napi-v3');` (see https://github.com/kimadeline/hello-world-ort-node/pull/2/), so we have to respect this folder structure when copying them over from the `onnxruntime-node` npm package .

It would be helpful if we could specify any path pointing to the `napi-v3` folder, so that we can remove extra layers in the final bundled extension folder.

### Describe scenario use case

This would allow consumers of `onnxruntime-node` to not be constrained by the `node_modules/onnxruntime-node/bin/napi-v3` folder structure when copying ort-node binaries to a destination folder.

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

Start by tracing how onnxruntime-node resolves binaries under bin/napi-v3 when bundled with Webpack. Define a way for consumers to provide an arbitrary napi-v3 directory, then verify that the VS Code extension scenario works without requiring the node_modules/onnxruntime-node/bin/napi-v3 folder structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, webpack
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.