synfx-dsp-jit is a specialized JIT compiler for digital (audio) signal processing for Rust.
This library allows you to compile an simplified abstract syntax tree (AST) down to machine code. This crate uses the Cranelift JIT compiler for this task.
The result is packaged conveniently for you in a [DSPFunction] structure.
One primary feature that is covered by this library is the state management of stateful nodes/components that can be called from the AST. By attaching a unique ID to your AST nodes that call stateful components (aka nodes), this library tracks already initialized nodes. It does this to allow you to re-compile the [DSPFunction] and make changes without the audio being interrupted (unless your changes interrupt it).
Aside from the compiling process and state management this library also offers a (growing) standard library of common DSP algorithms.
All this means this library is primarily directed towards the use case within a real time synthesis environment.
You can practically build a JIT compiled Pure Data or SuperCollider with this. Other notable projects in this direction are:
License: GPL-3.0-or-later