-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
114 lines (102 loc) · 4.38 KB
/
Copy pathCargo.toml
File metadata and controls
114 lines (102 loc) · 4.38 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
[workspace]
members = [
"crates/lumen-core",
"crates/lumen-flags",
"crates/lumen-testkit",
"crates/turboquant-cache",
"crates/lumen-mlx",
"crates/lumen-diffusion",
"crates/lumen-server",
"crates/lumen-app",
"xtask",
]
# The libFuzzer targets need nightly + sanitizer flags and would drag
# libfuzzer-sys into every workspace build graph. They are driven exclusively
# through `cargo xtask fuzz`; the deterministic twin of each target runs in
# tier 0 as `crates/lumen-mlx/tests/tool_surface_fuzz.rs`.
exclude = ["fuzz"]
# lumen-app pulls in the Tauri + webview stack (~hundreds of crates). Excluding
# it from `default-members` keeps `cargo build` / `cargo test` at the workspace
# root fast — build the desktop app explicitly with `cargo build -p lumen-app`
# (dev) or `cargo tauri build` (release bundle).
default-members = [
"crates/lumen-core",
"crates/lumen-flags",
"crates/lumen-testkit",
"crates/turboquant-cache",
"crates/lumen-mlx",
"crates/lumen-diffusion",
"crates/lumen-server",
]
resolver = "2"
[workspace.package]
edition = "2024"
rust-version = "1.85"
license = "MIT"
# `coverage` is set by `cargo llvm-cov`, and `lumen_core::always!()` /
# `never!()` expand a `#[cfg(coverage)]` arm at every call site — including in
# other crates — so the cfg has to be known workspace-wide or every consumer
# warns. Declared here rather than allowed, so a genuine typo in a cfg name is
# still caught.
[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage)', 'cfg(coverage_nightly)'] }
# Two clippy lints are allowed workspace-wide, on purpose and with a reason.
# Everything else is expected to be zero so `cargo xtask gate` can fail on a
# new warning; a lint left warning forever teaches people to skim the output,
# which is how the 330-warning backlog happened in the first place.
[workspace.lints.clippy]
# 27 sites. A kernel entry point takes what the kernel takes: queries, keys,
# values, scale, mask, cache, offsets, window, flags. Bundling them into a
# params struct does not reduce the arity, it hides it behind a constructor
# and adds a copy on a path where the copy is measurable. The threshold is a
# heuristic for business logic and this is not business logic.
too_many_arguments = "allow"
# 18 sites, almost all `HashMap<String, Vec<(usize, Array)>>`-shaped weight
# tables built once at load time. A type alias would name the shape without
# explaining it, and the shape is the documentation: what the loader returns
# is exactly what the checkpoint contains.
type_complexity = "allow"
# 12 sites, every one a matrix kernel where the loop index is the algorithm:
# `for i in 0..dim { let row = &m[i*dim..(i+1)*dim]; y[i] = row·x }` uses `i`
# to slice the operand AND to place the result. The iterator rewrite has to
# thread both, and reads worse than the arithmetic it replaces.
needless_range_loop = "allow"
# 2 sites, both runner enums that exist once per process for its lifetime.
# Boxing the big variant to even them up would add an indirection on the
# decode path to save bytes that are never allocated more than once.
large_enum_variant = "allow"
[workspace.dependencies]
# TurboQuant workspace crates
lumen-core = { path = "crates/lumen-core" }
# Test-only; add under `[dev-dependencies]`, never `[dependencies]`.
lumen-testkit = { path = "crates/lumen-testkit" }
turboquant-cache = { path = "crates/turboquant-cache" }
# Linear algebra & numerics
faer = "0.24"
rand = "0.10.1"
rand_distr = "0.6.0"
# Metal GPU (objc2 stack)
objc2-metal = "0.3.2"
objc2-metal-performance-shaders = "0.3.2"
objc2-metal-performance-shaders-graph = "0.3.2"
# Tokenizer & model loading
tokenizers = "0.23.1"
hf-hub = "0.5"
safetensors = "0.7.0"
# Serialization
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.150"
# HTTP server
atomic_http = { version = "0.14.0", features = ["arena", "router"] }
# Async runtime
tokio = { version = "1.52.3", features = ["full"] }
# Error handling
anyhow = "1.0.102"
thiserror = "2.0.18"
# ── Local-dev override (uncomment when you want to edit the mlx-rs fork
# in place instead of going through the git URL pin). A clean clone of
# lumen-rs uses the git refs above; only enable this path override if
# you have the sibling checkout.
# [patch."https://github.com/rabbitson87/mlx-rs"]
# mlx-rs = { path = "../../../mlx-rs/mlx-rs" }
# mlx-sys = { path = "../../../mlx-rs/mlx-sys" }