edgevec 0.5.4

High-performance embedded vector database for Browser, Node, and Edge
Documentation
# EdgeVec Cargo Configuration

# =============================

# Architecture: APPROVED (Gate 1 Complete: 2025-12-05)

# Planning: Week 1 Day 1 — Repository Initialization

#

# IMPLEMENTED: W1.D1 — Basic dependencies for testing infrastructure

# IMPLEMENTED: W18.2 — Added workspace for xtask



[workspace]

members = [".", "xtask"]

exclude = ["fuzz"]  # Fuzz crate uses cargo-fuzz which manages its own workspace



[package]

name = "edgevec"

version = "0.5.4"

edition = "2021"

rust-version = "1.70"

description = "High-performance embedded vector database for Browser, Node, and Edge"

license = "MIT OR Apache-2.0"

repository = "https://github.com/matte1782/edgevec"

keywords = ["vector", "database", "wasm", "hnsw", "similarity-search"]

categories = ["database", "wasm", "algorithms"]

autobenches = false  # Disable auto-detection of bench targets (recall_bench is a [[bin]])



# =============================================================================

# PACKAGE EXCLUSIONS — Reduce crate size for crates.io (max 10 MiB)

# =============================================================================

# Internal development files that users don't need:

exclude = [

    # IDE configuration directories

    ".claude/",

    ".cursor/",

    ".github/",



    # ALL internal documentation - users get README + rustdoc

    "docs/",



    # Test files (users run their own tests)

    "tests/",



    # Benchmark data and tooling (users don't need our benchmarks)

    "benches/baselines.json",

    "benches/baselines.json.bak",

    "benches/competitive/",      # Node.js competitive benchmarks with node_modules

    "benches/*.py",              # Python benchmark scripts



    # NPM package output (separate distribution)

    "pkg/",



    # Workspace members (published separately or internal)

    "xtask/",



    # Gate files (internal process tracking)

    "GATE_*.md",



    # Misc internal files

    ".cursorrules",

    "CONTRIBUTING.md",

    "CLAUDE.md",                 # Internal dev rules



    # Build/dev scripts (not needed by library users)

    "scripts/",



    # Test artifacts and data

    "proptest-regressions/",

    "*.wal",                     # WAL test files

    "*.tgz",                     # Old tarballs



    # WASM test files (published via npm, not crates.io)

    "wasm/__tests__/",

]



[lib]

name = "edgevec"

crate-type = ["lib", "cdylib"]



# =============================================================================

# DEPENDENCIES — Day 1: Core Infrastructure

# =============================================================================



[dependencies]

bitvec = { version = "1.0", features = ["serde"] }

# Error handling (required by Day 1 spec)

thiserror = "1.0"



# Serialization (required by Day 1 spec)

serde = { version = "1.0", features = ["derive"] }



# Safe type casting for WASM (required by Day 1 spec)

bytemuck = { version = "1.14", features = ["derive"] }

crc32fast = "1.3"



# Filter expression parsing (Week 23)

pest = "2.7"

pest_derive = "2.7"



# JSON serialization for WASM (Week 23 Day 4) - minimal features for size

serde_json = { version = "1.0", default-features = false, features = ["std"] }



# Random Number Generation (Required for HNSW construction)

rand = { version = "0.8", features = ["small_rng"] }

rand_chacha = { version = "0.3", features = ["serde1"] }



# Serde helpers for binary efficiency

serde_bytes = "0.11"

postcard = { version = "1.0", features = ["use-std"] }



# WASM Dependencies (W4.1)

wasm-bindgen = "0.2"

wasm-bindgen-futures = "0.4"

js-sys = "0.3"

web-sys = { version = "0.3", features = ["console", "Window", "Performance", "IdbFactory", "IdbDatabase", "IdbTransaction", "IdbTransactionMode", "IdbObjectStore", "IdbRequest", "DomException"] }

serde-wasm-bindgen = "0.6"

console_error_panic_hook = "0.1"

console_log = "1.0"

log = "0.4"

getrandom = { version = "0.2.14", features = ["js"] }

cfg-if = "1.0.4"



# =============================================================================

# DEV DEPENDENCIES — Day 1: Testing Infrastructure

# =============================================================================



[dev-dependencies]

# Property-based testing (required for "Nvidia Grade" verification)

proptest = { version = "=1.4.0", default-features = false, features = ["std"] }

# WASM testing

wasm-bindgen-test = "0.3"

serde_json = "1.0"



# Benchmarking framework (required for performance budgets)

criterion = { version = "0.5", features = ["html_reports"], default-features = false }

tempfile = "=3.10.0"



[[bench]]

name = "distance_bench"

harness = false



[[bench]]

name = "persistence_bench"

harness = false



[[bench]]

name = "storage_bench"

harness = false



[[bench]]

name = "search_bench"

harness = false



[[bench]]

name = "hnsw_init_bench"

harness = false



[[bench]]

name = "insert_bench"

harness = false



[[bench]]

name = "simd_bench"

harness = false



[[bench]]

name = "delete_bench"

harness = false



[[bench]]

name = "scaling_bench"

harness = false



[[bench]]

name = "quant_bench"

harness = false



[[bench]]

name = "memory_bench"

harness = false



[[bench]]

name = "bench_quantization"

harness = false



[[bench]]

name = "validation"

harness = false



[[bench]]

name = "batch_vs_sequential"

harness = false



[[bench]]

name = "tombstone_bench"

harness = false



[[bench]]

name = "batch_delete_bench"

harness = false



[[bench]]

name = "p99_bench"

harness = false



[[bench]]

name = "filter_strategy_bench"

harness = false



[[example]]

name = "batch_insert"



# [[bin]]

# name = "recall_bench"

# path = "benches/recall_bench.rs"

# Note: autobenches = false in [package] prevents dual target registration

# TEMPORARILY DISABLED: Linker error with cdylib target - needs investigation



# =============================================================================

# FUTURE DEPENDENCIES (Not in Day 1 scope)

# =============================================================================

# To be added in Week 1 Day 3-5:

# - rand / rand_chacha (deterministic RNG for tests)



# =============================================================================

# BUILD PROFILES

# =============================================================================



[package.metadata.wasm-pack.profile.release]

# Disable wasm-opt temporarily to investigate iOS Safari compatibility issues

# Root cause: wasm-opt was failing with "unexpected false: all used features should be allowed"

# on i32.trunc_sat_f64_u instruction, which requires --enable-nontrapping-float-to-int

# TODO: Re-enable wasm-opt with correct feature flags after verifying WASM works on iOS

wasm-opt = false



[profile.release]

opt-level = "z"     # Optimize for size in WASM bundles

lto = true          # Link-time optimization

codegen-units = 1   # Single codegen unit for maximum optimization

strip = true        # Strip symbols for smaller binary



[profile.release-wasm]

inherits = "release"

opt-level = "z"     # Optimize for size in WASM (changed from "s" to match Day 1 spec)



[profile.bench]

inherits = "release"

opt-level = 3       # Optimize for speed during benchmarks

debug = true        # Include debug info for profiling



# =============================================================================

# FEATURES (Minimal set for Day 1)

# =============================================================================



[features]

default = []

simd = []



# =============================================================================

# CONFIGURATION STATUS

# =============================================================================

# ✅ Architecture: APPROVED (2025-12-05)

# ✅ Planning: Week 1 Day 1 Tasks APPROVED

# ✅ Dependencies: Day 1 spec (thiserror, serde, bytemuck)

# ✅ Dev Dependencies: Day 1 spec (proptest, criterion)

# ✅ Build Profile: Performance (opt-level = 3, lto = true)

#

# Next: Day 2-5 will add fuzz infrastructure and additional test harness

# =============================================================================