-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
68 lines (62 loc) · 3.19 KB
/
Copy pathCargo.toml
File metadata and controls
68 lines (62 loc) · 3.19 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
[package]
name = "vulkanforge"
version = "1.0.5"
edition = "2024"
rust-version = "1.85"
license = "GPL-3.0-only"
[dependencies]
ash = "0.38"
bytemuck = { version = "1", features = ["derive"] }
clap = { version = "4", features = ["derive"] }
fancy-regex = "0.13"
gpu-allocator = "0.27"
half = "2"
memmap2 = "0.9"
rayon = "1"
rustyline = "15"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
# v0.4.0 API server stack (Sprint 1 lands the deps; types/error/sampling
# need axum for IntoResponse; tokio/tower-http/uuid are pre-positioned
# for Sprint 2-3 router + state + chatcmpl-id generation).
axum = { version = "0.8", default-features = false, features = ["json", "http1", "tokio"] }
tokio = { version = "1", features = ["full"] }
tower-http = { version = "0.6", features = ["cors", "trace"] }
uuid = { version = "1", features = ["v4"] }
# Sprint 3 — SSE streaming. `futures-util` gives us Stream/StreamExt,
# `tokio-stream` wraps mpsc::Receiver as a Stream for the SSE adapter.
futures-util = { version = "0.3", default-features = false, features = ["std"] }
tokio-stream = "0.1"
# Stufe A — server-side memory subsystem (SQLiteGraph + fastembed, embedded
# in the API process; see src/server/memory.rs). Both git-deps pinned to the
# verified revs from results/pre_memory_analyse.md. GPL-3.0 (SG) is compatible
# with this crate's GPL-3.0; fastembed is Apache-2.0. These two crates are what
# VulkanForge directly uses; each brings heavy native surface of its own:
# SQLiteGraph pulls in SQLite via `rusqlite` (bundled C compile), and fastembed
# pulls in the ONNX Runtime via `ort` (downloaded binary). See the Stufe-A report
# for the build-time / binary-size delta. Used only by the `/memory/*` handlers;
# the inference path does not touch them.
#
# Both are `optional` and pulled in ONLY by the `memory` feature (default OFF) —
# the default build is lean (~25 MB, neither SQLiteGraph nor fastembed, so no
# rusqlite/SQLite and no ort/ONNX Runtime). Build with `--features memory` to
# compile the subsystem in, then activate it at runtime with `serve --memory`.
sqlitegraph = { git = "https://github.com/maeddesg/sqlitegraph", rev = "80a3168aa4f837adef518bef0b203b27ab90c45b", package = "sqlitegraph", optional = true }
fastembed = { git = "https://github.com/maeddesg/fastembed-rs", rev = "3a9588ac52c0d825118b44775526caac02175193", default-features = false, features = ["ort-download-binaries-native-tls", "hf-hub-native-tls"], optional = true }
[features]
# Default build is lean: NO memory subsystem, NO heavy native deps.
default = []
# Opt-in server-side memory subsystem (compile gate). Pulls in SQLiteGraph +
# fastembed and compiles `src/server/memory.rs`, the `/memory/*` handlers, and
# their wiring. Runtime activation is a second gate: `serve --memory`.
memory = ["dep:sqlitegraph", "dep:fastembed"]
[build-dependencies]
shaderc = "0.8"
[profile.release]
opt-level = 3
lto = "thin"
# Security hardening: untrusted GGUF/SafeTensors file input flows into size
# arithmetic. overflow-checks turns a silent wrap into a defined panic; the
# parser itself returns clean Errs (checked_* in gguf.rs) before reaching it.
# Hot work is GPU shaders / AVX intrinsics, unaffected by this flag.
overflow-checks = true