dda-rs
Pure Rust Delay Differential Analysis (DDA) engine and the ddalab command-line tool. The same crate runs in the browser as WebAssembly in the DDALAB web application.
All analysis runs through the Rust engine directly; nothing shells out to a native DDA binary.
Command-line tool
Install it as a Python tool (the wheel carries the ddalab executable only) or download an archive and its .sha256 file from GitHub Releases:
uv tool install ddalab
ddalab inspect --file recording.edf
ddalab run --file recording.edf --variants ST --wl 1000 --ws 200 --delays 7 10 --bundle out
It reads EDF, BDF, BrainVision and delimited text. ddalab --help lists the other commands (batch, variants, validate, samples, info).
Features
- Pure Rust execution for DDA variants and CCD extensions
- Typed request/response API with
serde - Built-in variant metadata and SELECT-mask helpers
- Configurable solver backend:
RobustSvdfor the default numerically stable pathNativeCompatSvdfor the native-compatible SVD path
- Optional batched CUDA acceleration for ST, CT, CD, DE, and SY
Rust library
[dependencies]
dda-rs = "2.2.0"
Quick Start
use dda_rs::{
run_request_on_matrix, AlgorithmSelection, DDARequest, DelayParameters, PreprocessingOptions,
TimeRange, WindowParameters,
};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let request = DDARequest {
file_path: "synthetic.csv".to_string(),
channels: Some(vec![0, 1, 2]),
time_range: TimeRange {
start: 0.0,
end: 511.0,
},
preprocessing_options: PreprocessingOptions {
highpass: None,
lowpass: None,
},
algorithm_selection: AlgorithmSelection {
enabled_variants: vec!["ST".to_string(), "CD".to_string()],
select_mask: None,
},
window_parameters: WindowParameters {
window_length: 128,
window_step: 64,
ct_window_length: None,
ct_window_step: None,
},
delay_parameters: DelayParameters { delays: vec![1, 2] },
ct_channel_pairs: None,
cd_channel_pairs: None,
model_parameters: None,
model_terms: None,
variant_configs: None,
sampling_rate: None,
};
let samples = (0..512)
.map(|t| {
let x = t as f64 * 0.03;
vec![x.sin(), (1.7 * x).cos(), (0.5 * x).sin()]
})
.collect::<Vec<_>>();
let result = run_request_on_matrix(&request, &samples, None)?;
println!("analysis id: {}", result.id);
Ok(())
}
Solver Backends
The Rust engine exposes two SVD backends through PureRustOptions::svd_backend:
SvdBackend::RobustSvd- default
- uses nalgebra SVD
- preferred for real analysis
SvdBackend::NativeCompatSvd- uses the native-compatible SVD kernel ported into Rust
- useful when comparing against historical native-binary behavior
CUDA
CPU execution remains the default. Build the optional CUDA backend and select a device with:
cargo run --release --features cuda -- run --file data.csv --channels 0 1 --device cuda
--device cuda:N selects device N. The CUDA build dynamically loads the NVIDIA driver and cuBLAS. Compilation does not require a local CUDA toolkit; execution requires a working NVIDIA CUDA installation. The implementation batches same-shaped f64 regressions and computes predictions and residual norms on the GPU. Rank-deficient regressions fall back to the CPU SVD solver. Rust-only CCD extensions continue to use their existing CPU implementations.
Library users configure the same backend through PureRustOptions:
use dda_rs::{ComputeDevice, PureRustOptions, PureRustRunner};
let runner = PureRustRunner::new(PureRustOptions {
compute_device: ComputeDevice::Cuda(0),
..PureRustOptions::default()
});
Modules
engine: core DDA and CCD executiontypes: request/response structuresvariants: variant metadata and SELECT-mask utilitiesnetwork_motifs: motif analysis helpersprofiling: profiling helperserror: error types
License
MIT
Metadata
Release files for ddalab 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| ddalab-2.2.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for ddalab-2.2.0-py3-none-win_amd64.whl |
| ddalab-2.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for ddalab-2.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| ddalab-2.2.0-py3-none-macosx_11_0_x86_64.whl | Python 3 | none | macOS 11.0+ x86-64 | Details for ddalab-2.2.0-py3-none-macosx_11_0_x86_64.whl |
| ddalab-2.2.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for ddalab-2.2.0-py3-none-macosx_11_0_arm64.whl |
Total release size: 5.1 MB
Release files / ddalab-2.2.0-py3-none-win_amd64.whl
| Download URL | ddalab-2.2.0-py3-none-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6ea533569375ae34fa4c7bd31ccb1b7409f89aa8ebc1c218b83df9a65106cf64
|
|
BLAKE2b-256 checksum How to use checksums |
bba52c6aced2e0a743577f349d0a51c741ab6de9dddb03b4286af15a897cf7a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / ddalab-2.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ddalab-2.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
805cdcf9dcf01abb0c7337f63226237d72b4423bed2158fbfbaf52ee63703dec
|
|
BLAKE2b-256 checksum How to use checksums |
08ef92d028b864f3985eae043326be09b17d3619758b20815ec74f48b1e11ac3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / ddalab-2.2.0-py3-none-macosx_11_0_x86_64.whl
| Download URL | ddalab-2.2.0-py3-none-macosx_11_0_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
51ac66f8cb5d6695a25cfa3247566300601e26aa96508cb132ffe702d6e5e63b
|
|
BLAKE2b-256 checksum How to use checksums |
2b5589eb21eb88f10bc5e1df5ffb4da45b1dbe82d37237dbe456954daeb8c89d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / ddalab-2.2.0-py3-none-macosx_11_0_arm64.whl
| Download URL | ddalab-2.2.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
16f94f925d0ff67695851dbe55558bb1a293fb4573af1e7d0fb3114043fab390
|
|
BLAKE2b-256 checksum How to use checksums |
112100f2d9505ff48488e0255a77fdcba03336415ad0c384a801db6c6c9be23c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logSecurity for ddalab 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for ddalab-2.2.0-py3-none-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.