onnxruntime-common serves as the foundational JavaScript API layer for the ONNX Runtime ecosystem, providing shared types, interfaces, and core functionalities. It is designed to be consumed indirectly by platform-specific packages like `onnxruntime-node`, `onnxruntime-web`, and `onnxruntime-react-native`, rather than being used directly by end-user applications. The current stable version is 1.24.3, with frequent patch releases addressing bug fixes, security enhancements, and execution provider updates, as evidenced by recent 1.24.x versions. Its primary differentiator is enabling a consistent programming model across various JavaScript environments, abstracting away platform-specific implementations and ensuring interoperability for machine learning inference.
npm install onnxruntime-commonVerified import paths — ran on the pinned version, not inferred.
Upgrade Python environments to version 3.11 or newer to ensure compatibility with ONNX Runtime Python packages.
Ensure development and deployment environments for macOS/iOS target ARM64 architecture and run macOS 14.0 (Sonoma) or newer.
Update CUDA toolkit, drivers, and related dependencies to version 12.x or higher when utilizing GPU execution providers.
Ensure target Windows machines are running OS Build 10.0.19041 or newer to avoid compatibility issues.
For Node.js, install `onnxruntime-node`. For browsers, use `onnxruntime-web`. For React Native, use `onnxruntime-react-native`. Import core functionality from these specific packages.
Immediately upgrade to `onnxruntime-common@1.24.3` or a newer version to apply essential security patches and prevent potential exploits.
Install the correct platform-specific ONNX Runtime package (e.g., `npm install onnxruntime-node`) and adjust your imports to use that package directly (e.g., `import * as ort from 'onnxruntime-node';`).
Ensure you are importing and calling `create` from the platform-specific package's `InferenceSession` implementation (e.g., `import * as ort from 'onnxruntime-node'; const session = await ort.InferenceSession.create('model.onnx');`).When creating an `InferenceSession`, pass `sessionOptions` to explicitly define execution providers, for example: `{ executionProviders: ['webgpu', 'wasm'] }` for web or `{ executionProviders: ['cuda', 'cpu'] }` for Node.js.No dependency data recorded yet.