Skip to content

Release/v0.2.0#24

Merged
arnoox merged 6 commits intomainfrom
release/v0.2.0
Mar 16, 2026
Merged

Release/v0.2.0#24
arnoox merged 6 commits intomainfrom
release/v0.2.0

Conversation

@arnoox
Copy link
Owner

@arnoox arnoox commented Mar 16, 2026

No description provided.

Arnaud Riess and others added 6 commits March 16, 2026 16:45
Add a new example demonstrating the full herkos pipeline with a
numerically substantive algorithm:

- fft.c: radix-2 Cooley-Tukey DIT FFT (no libc/libm)
  - Twiddle factors via Taylor series + recurrence
  - Bit-reversal permutation
  - In-place butterfly passes (12 stages)
  - Magnitude via __builtin_sqrtf (→ Wasm f32.sqrt)

- Compilation: clang to wasm32-unknown-unknown (1.1 KB binary)
- Transpilation: herkos generates memory-safe Rust (no unsafe)
- Integration: Rust host writes signals, reads spectrum

Key features:
- Zero unsafe code in transpiled output
- Memory isolation enforced by type system
- Three test signals: 1000 Hz, 440+2000 Hz, 3520+880 Hz
- Performance: ~420µs per FFT on modern CPU
- Accuracy: peak frequencies correct to ~1 Hz (bin resolution)

Suitable for release as a showcase example.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@arnoox arnoox merged commit bebcb34 into main Mar 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant