Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 2614e88

Browse files
authored
wasi-nn: add feature to use custom ONNX Runtime (#11060)
* wasi-nn: add feature to use custom ONNX Runtime * Change to onnx-download feature * Update onnx feature in CI, prtest:full
1 parent 79cf7e8 commit 2614e88

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ jobs:
778778
test_wasi_nn:
779779
strategy:
780780
matrix:
781-
feature: ["openvino", "onnx"]
781+
feature: ["openvino", "onnx-download"]
782782
os: ["ubuntu-24.04", "windows-2025"]
783783
include:
784784
- os: windows-2025

crates/wasi-nn/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ thiserror = { workspace = true }
3333

3434
ort = { version = "2.0.0-rc.2", default-features = false, features = [
3535
"copy-dylibs",
36-
"download-binaries",
3736
], optional = true }
3837
tch = { version = "0.17.0", default-features = false, optional = true}
3938

@@ -70,6 +69,8 @@ default = ["openvino", "winml"]
7069
openvino = ["dep:openvino"]
7170
# ONNX is available on all platforms.
7271
onnx = ["dep:ort"]
72+
# Use prebuilt ONNX Runtime binaries from ort.
73+
onnx-download = ["onnx", "ort/download-binaries"]
7374
# WinML is only available on Windows 10 1809 and later.
7475
winml = ["dep:windows"]
7576
# PyTorch is available on all platforms; requires Libtorch to be installed

crates/wasi-nn/examples/classification-component-onnx/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ cargo component build
1212
In the Wasmtime root directory, run the following command to build the Wasmtime CLI and run the WebAssembly component:
1313
```sh
1414
# build wasmtime with component-model and WASI-NN with ONNX runtime support
15-
cargo build --features component-model,wasi-nn,wasmtime-wasi-nn/onnx
15+
cargo build --features component-model,wasi-nn,wasmtime-wasi-nn/onnx-download
1616

1717
# run the component with wasmtime
1818
./target/debug/wasmtime run \

0 commit comments

Comments
 (0)