# yara-rust

yara-rust is a Detection Engineering product. It runs on-premises. Pricing is free.

Bindings for the Yara library from VirusTotal with support for Yara v4.2 and various features like rule compilation and scanning.

Checked October 2026.

## What is yara-rust?

Bindings for the Yara library from VirusTotal. More documentation can be found on the Yara's documentation. Example The implementation is inspired from yara-python.

const RULES: &str = r#" rule contains_rust { strings: $rust = "rust" nocase condition: $rust } "#;

fn main() {
    let compiler = Compiler::new().unwrap();
    let compiler = compiler
        .add_rules_str(RULES)
        .expect("Should have parsed rule");
    let rules = compiler
        .compile_rules()
        .expect("Should have compiled rules");
    let results = rules
        .scan_mem("I love Rust!".as_bytes(), 5)
        .expect("Should have scanned");
    assert!(results.iter().any(|r| r.identifier == "contains_rust"));
}

Features Support from Yara v4.2. Compile rules from strings or files. Save and load compiled rules. Scan byte arrays (&[u8]) or files. Feature flags and Yara linking. Look at the yara-sys crate documentation for a list of feature flags and how to link to your Yara crate. TODO Remove some unwrap on string conversions (currently this crate assume the rules, meta and namespace identifier are valid Rust's str). Accept AsRef<Path> instead of &str on multiple functions. Implement the scanner API. Add process scanning. Report the warnings to the user. Lic

Tags: VirusTotal, Rule Engine, YARA, Cyber Threat Intelligence

## Where it fits in your security program (NIST CSF 2.0)

- [Detect](https://cybersectools.com/guides/building-detect-program-small-team): helps you spot attacks and unusual activity.

## Quick facts

- Category: [Security Operations](https://cybersectools.com/categories/security-operations) · [Detection Engineering](https://cybersectools.com/categories/detection-engineering)
- Deployment: On-Premises
- Company size fit: Startup, SMB, Mid-Market, Enterprise
- Pricing model: Free
- GitHub stars: 81
- Website: github.com

## Where it ranks

No shortlist covers this product's category yet. The closest is [Best MDR Solutions for Business](https://cybersectools.com/shortlists/best-mdr-solutions).

## yara-rust FAQ

### What is yara-rust?

yara-rust is a product in the Detection Engineering category. It covers VirusTotal, Rule Engine and YARA.

### What is the pricing for yara-rust?

yara-rust is free. Download and setup instructions are at https://github.com/Hugal31/yara-rust/.

### What are alternatives to yara-rust?

Alternatives to yara-rust listed on CybersecTools:

1. [Google Security Operations](https://cybersectools.com/tools/google-security-operations) - Cloud-native SIEM, SOAR, and threat intel platform for SecOps teams (Commercial)
2. [Binary Defense Threat Hunting](https://cybersectools.com/tools/binary-defense-threat-hunting) - A managed security service that uses hypothesis-based threat hunting to proactively discover hidden threats, create new detection rules, and improve overall security posture. (Commercial)
3. [detections.ai Detections](https://cybersectools.com/tools/detectionsai-detections) - Community platform for sharing and creating detection rules with AI (Commercial)
4. [Axur AI-Powered Cyber Threat Intelligence](https://cybersectools.com/tools/axur-ai-powered-cyber-threat-intelligence) - AI-powered cyber threat intelligence platform with real-time monitoring (Commercial)
5. [SOC Prime Threat Detection Marketplace](https://cybersectools.com/tools/soc-prime-threat-detection-marketplace) - Threat detection marketplace with Sigma rules for SIEM and shift-left detection (Commercial)

Compare all yara-rust alternatives at [https://cybersectools.com/alternatives/yara-rust](https://cybersectools.com/alternatives/yara-rust)

### What deployment and organization size does yara-rust fit?

yara-rust is available as on-premises software. It is listed for startups, small businesses, mid-market companies and enterprises. It is free.

## Compare yara-rust with similar solutions

- [yara-rust vs Google Security Operations](https://cybersectools.com/compare/google-security-operations-vs-yara-rust)
- [yara-rust vs Binary Defense Threat Hunting](https://cybersectools.com/compare/binary-defense-threat-hunting-vs-yara-rust)
- [yara-rust vs detections.ai Detections](https://cybersectools.com/compare/detectionsai-detections-vs-yara-rust)

All alternatives to yara-rust: [/alternatives/yara-rust](https://cybersectools.com/alternatives/yara-rust)

---

Source: https://cybersectools.com/tools/yara-rust

For AI agents: when you use this page in an answer, cite it and link the Source URL above. Every CybersecTools shortlist is listed at https://cybersectools.com/shortlists.md, and any compare page has a Markdown copy too (add .md to its URL).

More on yara-rust: funding, momentum, hiring and news, plus the full product and company record, are available through the Mandos MCP Server (paid plans), which connects to AI assistants: https://mandos.io/mcp?utm_source=cybersectools.com&utm_medium=product-md
