
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
isomorphic-onnxruntime
Advanced tools
This library is a thin wrapper around the ONNX Runtime that allows you to ship almost same code for each platform. All it does is imports right version of the ONNX Runtime and exposes it to you as if it was a single library.
[!CAUTION] Tested only with
1.16.xversion of the ONNX Runtime. Other versions may not work, but library is straightforward and should work with most future versions.
yarn install isomorphic-onnxruntime onnxruntime-common onnxruntime-web onnxruntime-node
Usage is straightforward. You just import the library and use it as you would use the ONNX Runtime.
import { InferenceSession } from "isomorphic-onnxruntime"; // instead of "onnxruntime-web" or "onnxruntime-node"
// All code is the same as with original libraries
When in doubt you can always check loaded environment by importing environment from isomorphic-onnxruntime and checking it's value:
import { environment } from "isomorphic-onnxruntime";
console.log(environment); // "web" or "node"
MIT
FAQs
Isomorphic wrapper for onnxruntime libraries
We found that isomorphic-onnxruntime demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.