-
Notifications
You must be signed in to change notification settings - Fork 345
Expand file tree
/
Copy pathCargo.toml
More file actions
91 lines (77 loc) · 2.69 KB
/
Cargo.toml
File metadata and controls
91 lines (77 loc) · 2.69 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
[package]
name = "ruvector-wasm"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
readme = "README.md"
description = "WASM bindings for Ruvector including kernel pack system (ADR-005)"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
ruvector-core = { path = "../ruvector-core", default-features = false, features = ["memory-only", "uuid-support"] }
ruvector-collections = { path = "../ruvector-collections", optional = true }
ruvector-filter = { path = "../ruvector-filter", optional = true }
parking_lot = { workspace = true }
getrandom = { workspace = true }
# Add getrandom 0.2 with js feature for WASM compatibility
# This ensures all transitive dependencies use the WASM-compatible version
getrandom02 = { package = "getrandom", version = "0.2", features = ["js"] }
# WASM
wasm-bindgen = { workspace = true }
wasm-bindgen-futures = { workspace = true }
js-sys = { workspace = true }
web-sys = { workspace = true, features = [
"console",
"Window",
"IdbDatabase",
"IdbFactory",
"IdbObjectStore",
"IdbRequest",
"IdbTransaction",
"IdbOpenDbRequest",
] }
# Error handling
thiserror = { workspace = true }
anyhow = { workspace = true }
# Serialization
serde = { workspace = true }
serde_json = { workspace = true }
serde-wasm-bindgen = "0.6"
# Utils
console_error_panic_hook = "0.1"
tracing-wasm = "0.2"
# Cryptography for kernel pack verification (ADR-005)
sha2 = { version = "0.10", optional = true }
ed25519-dalek = { version = "2.1", optional = true }
hex = { version = "0.4", optional = true }
base64 = { version = "0.22", optional = true }
rand = { workspace = true, optional = true }
[dev-dependencies]
wasm-bindgen-test = "0.3"
rand = { workspace = true }
[features]
default = []
simd = ["ruvector-core/simd"]
# Collections and filter features (not available in WASM due to file I/O requirements)
# These features are provided for completeness but will not work in browser WASM
collections = ["dep:ruvector-collections", "dep:ruvector-filter"]
# Kernel pack system (ADR-005) - sandboxed compute kernel execution
kernel-pack = ["dep:sha2", "dep:ed25519-dalek", "dep:hex", "dep:base64"]
# Enable kernel signing capability (requires rand)
signing = ["kernel-pack", "dep:rand"]
# Ensure getrandom uses wasm_js/js features for WASM (both 0.2 and 0.3 versions)
[target.'cfg(target_arch = "wasm32")'.dependencies]
# getrandom 0.3.x uses wasm_js feature
getrandom = { workspace = true, features = ["wasm_js"] }
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
[profile.release.package."*"]
opt-level = "z"
[package.metadata.wasm-pack.profile.release]
wasm-opt = false