File size: 1,278 Bytes
5e84645
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
[package]
name = "vectorhd-core"
version = "0.1.0"
edition = "2021"
description = "VectorHD analytic-optimizer core: exact cell-coverage rasterizer + boundary-integral gradient"
license = "MIT OR Apache-2.0"
publish = false

[lib]
# The Python extension must be importable as `vectorhd_core`, so the lib name is fixed here.
name = "vectorhd_core"
# rlib for the CLI and unit tests; cdylib for both the wasm module and the Python extension.
crate-type = ["rlib", "cdylib"]

[[bin]]
name = "spike-cli"
path = "src/bin/spike_cli.rs"

[[bin]]
name = "window-bench"
path = "src/bin/window_bench.rs"

# Dependency policy: minimal. serde only for file I/O — nothing numeric. Optional integrations sit
# behind features so the core still builds bare for wasm.
# No wasm-bindgen: the wasm build exports raw `extern "C"` functions over linear memory
# (see src/wasm.rs), which keeps the binary small and measures compute rather than glue.
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
pyo3 = { version = "0.29", features = ["extension-module"], optional = true }
numpy = { version = "0.29", optional = true }

[features]
default = []
# `python` is what maturin builds: pyo3 + rust-numpy for zero-copy ndarray views.
python = ["dep:pyo3", "dep:numpy"]