mirror of
https://github.com/ruvnet/RuView
synced 2026-08-10 20:31:42 +00:00
6fe405a5f7
The standalone ghost_hunter binary defines its own on_init/on_frame/on_timer WASM3 entry-points; the lib also exports those when default-pipeline is on. A vanilla `cargo build -p wifi-densepose-wasm-edge --target wasm32-unknown-unknown --release` would build both, producing a "Linking globals named 'on_frame': symbol multiply defined!" error. Fix: declare an explicit `[[bin]] required-features = ["standalone-bin"]` gate so the bin only builds when the user opts in with `--no-default-features --features standalone-bin`. The default feature set continues to produce the combined-pipeline lib (15 KB wasm32). Validation: - cargo build -p wifi-densepose-wasm-edge --target wasm32-unknown-unknown --release → 15 KB wifi_densepose_wasm_edge.wasm (default-pipeline lib) - cargo build -p wifi-densepose-wasm-edge --bin ghost_hunter --target wasm32-unknown-unknown --release --no-default-features --features standalone-bin → 5.8 KB ghost_hunter.wasm (standalone module) - cd v2/crates/wifi-densepose-wasm-edge && cargo test --features std --no-default-features → 75/75 tests pass Co-Authored-By: claude-flow <ruv@ruv.net>
47 lines
1.5 KiB
TOML
47 lines
1.5 KiB
TOML
[package]
|
|
name = "wifi-densepose-wasm-edge"
|
|
version = "0.3.0"
|
|
edition = "2021"
|
|
authors = ["rUv <ruv@ruv.net>", "WiFi-DensePose Contributors"]
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/ruvnet/wifi-densepose"
|
|
description = "WASM-compilable sensing algorithms for ESP32 edge deployment (ADR-040)"
|
|
keywords = ["wifi", "wasm", "sensing", "esp32", "dsp"]
|
|
categories = ["embedded", "wasm", "science"]
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[dependencies]
|
|
# no_std math
|
|
libm = "0.2"
|
|
# SHA-256 for RVF build hash (optional, used by builder)
|
|
sha2 = { version = "0.10", optional = true, default-features = false }
|
|
|
|
[features]
|
|
default = ["default-pipeline"]
|
|
# Enable std for testing on host + RVF builder
|
|
std = ["sha2/std"]
|
|
# Include the default combined pipeline (gesture+coherence+adversarial) entry points.
|
|
# Disable this when building standalone module binaries (ghost_hunter, etc.)
|
|
default-pipeline = []
|
|
# Build the standalone-bin Ghost Hunter target. Required because that binary
|
|
# defines its own on_init / on_frame / on_timer entry points which would
|
|
# collide with the lib's `default-pipeline` exports. Build with:
|
|
# cargo build -p wifi-densepose-wasm-edge --bin ghost_hunter \
|
|
# --target wasm32-unknown-unknown --release \
|
|
# --no-default-features --features standalone-bin
|
|
standalone-bin = []
|
|
|
|
[[bin]]
|
|
name = "ghost_hunter"
|
|
path = "src/bin/ghost_hunter.rs"
|
|
required-features = ["standalone-bin"]
|
|
|
|
[profile.release]
|
|
opt-level = "s" # Optimize for size
|
|
lto = true
|
|
codegen-units = 1
|
|
panic = "abort"
|
|
strip = true
|