Expand description
SYARA-X — Super YARA in Rust.
Extends the YARA rule format with semantic, ML-classifier, and LLM-based matching.
§Example
use syara_x;
let rules = syara_x::compile_str(r#"
rule test_rule {
strings:
$s1 = "hello world" nocase
condition:
$s1
}
"#).unwrap();
let matches = rules.scan("Hello World");
assert_eq!(matches.iter().filter(|m| m.matched).count(), 1);Re-exports§
pub use compiled_rules::CompiledRules;pub use error::SyaraError;pub use models::Match;pub use models::MatchDetail;pub use models::Rule;
Modules§
Functions§
- compile
- Compile rules from a
.syarafile. - compile_
str - Compile rules from a string.