yara-x 1.15.0

A pure Rust implementation of YARA.
Documentation
import "test_proto2"

rule test_1 {
	condition:
		1 + 1 - 1 == 1
}

rule test_2 {
	condition:
		test_proto2.int64_one + 1 - test_proto2.int64_one == 1
}

rule test_3 {
	condition:
		1 * 2 \ 1 > 1
}

rule test_4 {
	condition:
		(1 << 2) >> 1 <= 2
}

rule test_5 {
	condition:
		4 --2 * 2 == 8
}

rule test_6 {
  condition:
    2 ^ 1 == ~1 & 1 | 1
}

rule test_7 {
	condition:
		test_proto2.int64_zero == 0 and true and not false
}

rule test_8 {
	condition:
		test_proto2.int64_zero + 1 + 2
}

rule test_9 {
  condition:
     "foobar" contains "bar" and
     "foobar" icontains "BAR" and
     "foobar" startswith "foo" and
     "foobar" istartswith "FOO" and
     "foobar" endswith "bar" and
     "foobar" iendswith "BAR"
}