Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/wasi-nn/Cargo.toml
3092 views
1
[package]
2
name = "wasmtime-wasi-nn"
3
version.workspace = true
4
authors.workspace = true
5
description = "Wasmtime implementation of the wasi-nn API"
6
documentation = "https://docs.rs/wasmtime-wasi-nn"
7
license = "Apache-2.0 WITH LLVM-exception"
8
categories = ["wasm", "computer-vision"]
9
keywords = ["webassembly", "wasm", "neural-network"]
10
repository = "https://github.com/bytecodealliance/wasmtime"
11
readme = "README.md"
12
edition.workspace = true
13
rust-version.workspace = true
14
15
[lints]
16
workspace = true
17
18
[dependencies]
19
# These dependencies are necessary for the WITX-generation macros to work:
20
wiggle = { workspace = true, features = ["wasmtime"] }
21
22
# This dependency is necessary for the WIT-generation macros to work:
23
wasmtime = { workspace = true, features = [
24
"component-model",
25
"runtime",
26
"std",
27
] }
28
29
# These dependencies are necessary for the wasi-nn implementation:
30
tracing = { workspace = true }
31
thiserror = { workspace = true }
32
33
ort = { version = "2.0.0-rc.10", default-features = false, features = [
34
"copy-dylibs",
35
], optional = true }
36
tch = { version = "0.17.0", default-features = false, optional = true}
37
38
[target.'cfg(target_pointer_width = "64")'.dependencies]
39
openvino = { version = "0.9.0", features = [
40
"runtime-linking",
41
], optional = true }
42
43
[target.'cfg(windows)'.dependencies.windows]
44
version = "0.52"
45
features = [
46
"AI_MachineLearning",
47
"Storage_Streams",
48
"Foundation_Collections",
49
# For getting IVectorView<i64> from tensor.dimensions.
50
"implement",
51
]
52
optional = true
53
54
[build-dependencies]
55
walkdir = { workspace = true }
56
57
[dev-dependencies]
58
cap-std = { workspace = true }
59
libtest-mimic = { workspace = true }
60
test-programs-artifacts = { workspace = true }
61
wasmtime-wasi = { workspace = true, features = ["p1"] }
62
wasmtime = { workspace = true, features = ["cranelift"] }
63
tracing-subscriber = { workspace = true }
64
65
[features]
66
default = ["openvino", "winml"]
67
# OpenVINO is available on all platforms; it requires OpenVINO to be installed.
68
openvino = ["dep:openvino"]
69
# ONNX is available on all platforms.
70
onnx = ["dep:ort"]
71
# Use prebuilt ONNX Runtime binaries from ort.
72
onnx-download = ["onnx", "ort/download-binaries"]
73
# CUDA execution provider for NVIDIA GPU support (requires CUDA toolkit)
74
onnx-cuda = ["onnx", "ort/cuda"]
75
# Enable tracing for ONNX Runtime
76
ort-tracing = ["onnx", "ort/tracing"]
77
# WinML is only available on Windows 10 1809 and later.
78
winml = ["dep:windows"]
79
# PyTorch is available on all platforms; requires Libtorch to be installed
80
pytorch = ["dep:tch"]
81
82
[[test]]
83
name = "test-programs"
84
harness = false
85
86