-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathjustfile
More file actions
50 lines (38 loc) · 1.44 KB
/
justfile
File metadata and controls
50 lines (38 loc) · 1.44 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
fixtures:
uv run scripts/generate_fixtures.py
# Rust
test:
cargo test --workspace
fmt-check:
cargo fmt --all --check
clippy:
cargo clippy --workspace --all-targets -- -D warnings
bench:
cargo bench --bench bank
# Python vs noFFT throughput comparison
bench-vs-nofft:
uv run scripts/benchmark.py
# Python bindings (requires uv + Rust toolchain)
py-setup:
cd crates/resonators-py && uv venv --allow-existing && uv pip install maturin pytest numpy
py-build: py-setup
cd crates/resonators-py && uv run maturin develop --release --uv
py-test: py-build
cd crates/resonators-py && uv run pytest
# WASM bindings (requires wasm-pack)
wasm-build:
cd crates/resonators-wasm && wasm-pack build --target web --release --out-name resonators
sed -i.bak 's/"resonators-wasm"/"resonators"/' crates/resonators-wasm/pkg/package.json
rm crates/resonators-wasm/pkg/package.json.bak
# In-browser perf benchmark page (open http://localhost:8000)
wasm-bench: wasm-build
rm -rf examples/web-bench/pkg
cp -R crates/resonators-wasm/pkg examples/web-bench/pkg
cd examples/web-bench && python3 -m http.server 8000
# Live mic spectrogram demo (open http://localhost:8000)
wasm-spectrogram: wasm-build
rm -rf examples/web-spectrogram/pkg
cp -R crates/resonators-wasm/pkg examples/web-spectrogram/pkg
cd examples/web-spectrogram && python3 -m http.server 8000
# Everything
ci: fmt-check clippy test py-test wasm-build