This release brings several memory optimizations and small API improvements.
Memory optimizations comes in two forms:
- Generic optimizations to reduce the memory footprint of compiled rules, useful in all
cases when theScanner
object is kept for a long time. - The introduction of a new profile that can be set in the compiler, which will compile
rules to optimize for memory usage rather than scanning speed.
boreal
Breaking changes:
-
A memory pool was introduced to greatly reduce the memory footprint of compiled rules,
notably when the same meta strings are used in all rules. This introduces two breaking
changes:- The
Metadata
andMetadataValue
objects are no longer re-exported fromboreal-parser
but are new types. - To retrieve strings and byte-strings from those objects, the new
Scanner::get_bytes_symbol
andScanner::get_string_symbol
must be used.
- The
-
A new
CompilerBuilder
object is introduced, to be able to configure aCompiler
before
any rule is added. -
Added
UnwindSafe
andRefUnwindSafe
trait bounds on module datas: -
MSRV is bumped from 1.65 to 1.66 825aaab
Added
- Add CompilerBuilder object to add modules and configure compiler profile: 261b11c2
- Add compiler profile to pick between memory usage or scanning speed: #167.
- Add compiler param to disable includes: #170.
- Update compatibility with YARA 4.5.2: #172.
Changed
- Add bytes intern pool to reduce memory consumption: #165.
- Guarantee
Scanner
isUnwindSafe
andRefUnwindSafe
: #171.
- Update memory benchmarks 68a1e046
- Update windows-sys dependency to version 0.59 ff996f77
- Update tlsh2 dependency to version 0.4.0 29097dc8
Fixed
- Fix unused warning on statistics in default features config: #168.
boreal-cli
Added
- Added option
--profile
to select memory or speed profile: c3a89c29.