forked from robertknight/rten
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
92 lines (81 loc) · 2.53 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[workspace]
members = [
".",
"rten-cli",
"rten-generate",
"rten-imageio",
"rten-imageproc",
"rten-simd",
"rten-tensor",
"rten-text",
"rten-vecmath",
# Development crates. These are not published.
"rten-bench",
"rten-examples",
]
default-members = [
".",
"rten-imageproc",
"rten-tensor",
"rten-text"
]
[workspace.dependencies]
image = { version = "0.25.1", default-features = false, features = ["png", "jpeg", "webp"] }
serde = { version = "1.0.202" }
serde_json = { version = "1.0.117" }
[package]
name = "rten"
version = "0.13.1"
edition = "2021"
authors = ["Robert Knight"]
description = "Machine learning runtime"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/robertknight/rten"
repository = "https://github.com/robertknight/rten"
resolver = "2"
include = ["/src", "/CHANGELOG.md", "/README.md"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
flatbuffers = "24.3.25"
rayon = "1.7.0"
smallvec = { version = "1.10.0", features = ["union", "const_generics", "const_new"] }
rten-tensor = { path = "./rten-tensor", version = "0.13.1" }
rten-vecmath = { path = "./rten-vecmath", version = "0.11.0" }
rten-simd = { path = "./rten-simd", version = "0.11.0" }
fastrand = { version = "2.0.2", optional = true }
fastrand-contrib = { version = "0.1.0", optional = true }
rustc-hash = "2.0.0"
memmap2 = { version = "0.9.4", optional = true }
num_cpus = "1.16.0"
[dev-dependencies]
libm = "0.2.6"
rten-bench = { path = "./rten-bench" }
serde_json = { workspace = true }
[lib]
crate-type = ["lib", "cdylib"]
[features]
# Use AVX-512 instructions if available. Requires nightly Rust for AVX-512 intrinsics.
avx512 = ["rten-simd/avx512", "rten-vecmath/avx512"]
# Enable loading models using memory mapping
mmap = ["dep:memmap2"]
# Generate WebAssembly API using wasm-bindgen.
wasm_api = []
# Enable operators that generate random numbers.
random = ["dep:fastrand", "dep:fastrand-contrib"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2.83"
[lints.clippy]
# `assert!(const)` effectively used as a static assert, which compiler will
# optimize away.
assertions_on_constants = "allow"
# Clippy frequently suggests to replace for loops with const bounds (often used
# in performance-critical loops) with iterators, which is more verbose and
# potentially less efficient.
needless_range_loop = "allow"
too_many_arguments = "allow"
[package.metadata.docs.rs]
# These features should match the features enabled by `make docs`.
features = [
"mmap",
"random",
]