{"id":46476134,"url":"https://github.com/fulcrumgenomics/rust-yara","last_synced_at":"2026-03-09T10:00:37.846Z","repository":{"id":341730990,"uuid":"1171200296","full_name":"fulcrumgenomics/rust-yara","owner":"fulcrumgenomics","description":"Safe Rust FFI bindings for the YARA read mapper and indexer (SeqAn2)","archived":false,"fork":false,"pushed_at":"2026-03-06T05:32:51.000Z","size":2441,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-06T09:49:25.522Z","etag":null,"topics":["bioinformatics","ffi","genomics","read-mapping","rust","seqan2","yara"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fulcrumgenomics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-03T01:15:23.000Z","updated_at":"2026-03-06T05:24:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fulcrumgenomics/rust-yara","commit_stats":null,"previous_names":["fulcrumgenomics/rust-yara"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/fulcrumgenomics/rust-yara","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulcrumgenomics%2Frust-yara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulcrumgenomics%2Frust-yara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulcrumgenomics%2Frust-yara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulcrumgenomics%2Frust-yara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fulcrumgenomics","download_url":"https://codeload.github.com/fulcrumgenomics/rust-yara/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulcrumgenomics%2Frust-yara/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30209795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","ffi","genomics","read-mapping","rust","seqan2","yara"],"created_at":"2026-03-06T07:07:03.239Z","updated_at":"2026-03-07T08:00:56.390Z","avatar_url":"https://github.com/fulcrumgenomics.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/fulcrumgenomics/rust-yara/actions/workflows/check.yml/badge.svg)](https://github.com/fulcrumgenomics/rust-yara/actions/workflows/check.yml)\n[![crates.io](https://img.shields.io/crates/v/yara-mapper.svg)](https://crates.io/crates/yara-mapper)\n[![docs.rs](https://docs.rs/yara-mapper/badge.svg)](https://docs.rs/yara-mapper)\n[![License: MIT](https://img.shields.io/crates/l/yara-mapper.svg)](LICENSE)\n\n# rust-yara\n\nRust FFI bindings for the YARA read mapper.\n\n## Overview\n\nrust-yara provides safe Rust bindings for the\n[YARA read mapper](https://github.com/seqan/seqan/tree/main/apps/yara), a fast\nand accurate read mapper based on the SeqAn2 C++ library.  The workspace\nsupports both building FM indices from FASTA reference files and mapping\npaired-end reads against a pre-built index — all from Rust, without\nSAM serialization/deserialization overhead.\n\n## Crate Structure\n\n| Crate | Description |\n|-------|-------------|\n| [`yara-seqan2-sys`](https://crates.io/crates/yara-seqan2-sys) | Vendored SeqAn2 headers for the YARA read mapper |\n| [`yara-mapper-sys`](https://crates.io/crates/yara-mapper-sys) | Low-level FFI bindings to the YARA read mapper (SeqAn2) |\n| [`yara-mapper`](https://crates.io/crates/yara-mapper) | Safe Rust wrapper for the YARA read mapper |\n\n## Prerequisites\n\n- **Rust** stable toolchain (see `rust-toolchain.toml` for the pinned version)\n- **zlib** development headers\n- **OpenMP**:\n  - macOS: `brew install libomp`\n  - Linux: `libgomp` (typically included with GCC; install `libomp-dev` if\n    using Clang)\n\n## Quick Start\n\nAdd `yara-mapper` to your `Cargo.toml`:\n\n```sh\ncargo add yara-mapper\n```\n\nBuild an index and map reads:\n\n```rust,no_run\nuse yara_mapper::{IndexerOptions, MapperOptions, ReadBatch, YaraIndexer, YaraMapper};\n\n// Build an index from a FASTA file.\nlet indexer = YaraIndexer::build(\"ref.fasta\", \"ref\", \u0026IndexerOptions::default()).unwrap();\nprintln!(\"Indexed {} contigs\", indexer.contig_count());\n\n// Open the index and map reads.\nlet mapper = YaraMapper::open(\"ref\", \u0026MapperOptions::default()).unwrap();\nlet mut batch = ReadBatch::new();\nbatch.push(\"read1\", b\"ACGTACGT\", b\"IIIIIIII\", b\"TGCATGCA\", b\"IIIIIIII\").unwrap();\nlet records = mapper.map_paired(\u0026batch).unwrap();\nfor rec in \u0026records {\n    println!(\"contig={} pos={} mapq={}\", rec.contig_id, rec.pos, rec.mapq);\n}\n```\n\n## Examples\n\nBuild an FM index from a FASTA reference:\n\n```sh\ncargo run --example build_index -- ref.fasta ref\n```\n\nMap reads against a pre-built index:\n\n```sh\ncargo run --example align -- ref\n```\n\n## Building from Source\n\n```sh\ncargo build                  # debug build\ncargo clippy --all-targets   # lint\ncargo fmt --check            # format check\n```\n\nTo use a local SeqAn2 checkout instead of the vendored headers, set `SEQAN_DIR`:\n\n```sh\nexport SEQAN_DIR=/path/to/seqan\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\nThe vendored [SeqAn2](https://github.com/seqan/seqan) headers and\n[YARA](https://github.com/seqan/seqan/tree/main/apps/yara) application sources\nare licensed under the BSD 3-Clause License — see\n[`yara-seqan2-sys/vendor/include/seqan/LICENSE`](yara-seqan2-sys/vendor/include/seqan/LICENSE)\nand\n[`yara-seqan2-sys/vendor/apps/yara/LICENSE`](yara-seqan2-sys/vendor/apps/yara/LICENSE).\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulcrumgenomics%2Frust-yara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffulcrumgenomics%2Frust-yara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulcrumgenomics%2Frust-yara/lists"}