Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/wasi-nn/Cargo.toml
1690 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
anyhow = { workspace = true, features = ['std'] }
21
wiggle = { workspace = true, features = ["wasmtime"] }
22
23
# This dependency is necessary for the WIT-generation macros to work:
24
wasmtime = { workspace = true, features = [
25
"component-model",
26
"runtime",
27
"std",
28
] }
29
30
# These dependencies are necessary for the wasi-nn implementation:
31
tracing = { workspace = true }
32
thiserror = { workspace = true }
33
34
ort = { version = "2.0.0-rc.2", default-features = false, features = [
35
"copy-dylibs",
36
], optional = true }
37
tch = { version = "0.17.0", default-features = false, optional = true}
38
39
[target.'cfg(target_pointer_width = "64")'.dependencies]
40
openvino = { version = "0.9.0", features = [
41
"runtime-linking",
42
], optional = true }
43
44
[target.'cfg(windows)'.dependencies.windows]
45
version = "0.52"
46
features = [
47
"AI_MachineLearning",
48
"Storage_Streams",
49
"Foundation_Collections",
50
# For getting IVectorView<i64> from tensor.dimensions.
51
"implement",
52
]
53
optional = true
54
55
[build-dependencies]
56
walkdir = { workspace = true }
57
58
[dev-dependencies]
59
cap-std = { workspace = true }
60
libtest-mimic = { workspace = true }
61
test-programs-artifacts = { workspace = true }
62
wasmtime-wasi = { workspace = true, features = ["p1"] }
63
wasmtime = { workspace = true, features = ["cranelift"] }
64
tracing-subscriber = { workspace = true }
65
66
[features]
67
default = ["openvino", "winml"]
68
# OpenVINO is available on all platforms; it requires OpenVINO to be installed.
69
openvino = ["dep:openvino"]
70
# ONNX is available on all platforms.
71
onnx = ["dep:ort"]
72
# Use prebuilt ONNX Runtime binaries from ort.
73
onnx-download = ["onnx", "ort/download-binaries"]
74
# WinML is only available on Windows 10 1809 and later.
75
winml = ["dep:windows"]
76
# PyTorch is available on all platforms; requires Libtorch to be installed
77
pytorch = ["dep:tch"]
78
79
[[test]]
80
name = "test-programs"
81
harness = false
82
83