#bioinformatics #ffi #alignment #parasail #rust


Rust bindings and wrapper for parasail, a SIMD C library for pairwise sequence alignment

14 releases (6 breaking)

0.7.3 Apr 22, 2024
0.7.2 Apr 18, 2024
0.6.0 Mar 18, 2024
0.5.1 Mar 15, 2024
0.1.0 Feb 21, 2024

#57 in Biology

Download history 263/week @ 2024-02-21 542/week @ 2024-02-28 328/week @ 2024-03-06 404/week @ 2024-03-13 42/week @ 2024-03-20 127/week @ 2024-03-27 52/week @ 2024-04-03 88/week @ 2024-04-10 388/week @ 2024-04-17 34/week @ 2024-04-24 15/week @ 2024-05-01

525 downloads per month


985 lines


GitHub Actions Workflow Status docs.rs Crates.io Version

This crate provides safe Rust bindings and a wrapper to parasail, a SIMD pairwise sequence alignment C library. Note that this crate is still under development and is unstable.



Run the following Cargo command in your project directory:

cargo add parasail-rs

Note that parasail-rs depends on libparasail-sys which will either use an already installed system parasail library or build from source. For more information, please see libparasail-sys.


Basic usage:

For one-off alignments:

use parasail_rs::{Aligner};

let query = b"ACGT";
let reference = b"ACGT";
let aligner = Aligner::new().build();

aligner.align(Some(query), reference);

Using query profile:

use parasail_rs::{Matrix, Aligner, Profile};

let query = b"ACGT";
let ref_1 = b"ACGTAACGTACA";
let ref_2 = b"TGGCAAGGTAGA";

let use_stats = true;
let query_profile = Profile::new(query, use_stats, Matrix::default());
let aligner = Aligner::new()
 .profile(query_profile, 5, 2, "striped")

let result_1 = aligner.align(None, ref_1);
let result_2 = aligner.align(None, ref_2);


Contributions are more than welcome. Please open an issue or send an email to nsb5 [at] rice.edu for any feedback or questions.


If needed, please cite the following paper:

Daily, Jeff. (2016). Parasail: SIMD C library for global, semi-global, and local pairwise sequence alignments. BMC Bioinformatics, 17(1), 1-11. doi:10.1186/s12859-016-0930-z


parasail-rs and libparasail-sys are licensed under the BSD-3-Clause license. The original parasail C library is licensed under a similar Battelle style BSD license.

Nicolas S. Buitrago <nsb5 [at] rice.edu>


~704K SLoC