Skip to content

refactor(eval): split compiler.rs into module directory#53

Merged
mostafa merged 1 commit into
mainfrom
feat/modularize-compiler
Apr 30, 2026
Merged

refactor(eval): split compiler.rs into module directory#53
mostafa merged 1 commit into
mainfrom
feat/modularize-compiler

Conversation

@mostafa
Copy link
Copy Markdown
Member

@mostafa mostafa commented Apr 30, 2026

Summary

  • Split crates/rsigma-eval/src/compiler.rs (1824 lines) into a compiler/ module directory with 3 submodules for better maintainability
  • No functionality changes: pure restructuring with identical test results (366+ tests pass, full workspace clippy clean)

Test plan

  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets --all-features -- -D warnings passes (zero warnings)
  • cargo test -p rsigma-eval passes (366 unit tests + 47 integration/doc tests, 0 failures)

Modularize the 1824-line compiler.rs into focused submodules for
maintainability. No behavior changes; identical test results
(366 unit tests pass).

New structure:
  compiler/
    mod.rs       -- types, compilation, evaluation logic
    helpers.rs   -- encoding, regex, pattern matching utilities
    tests.rs     -- all unit and property tests
@mostafa mostafa merged commit 2ee0624 into main Apr 30, 2026
8 checks passed
@mostafa mostafa deleted the feat/modularize-compiler branch April 30, 2026 18:07
mostafa added a commit that referenced this pull request May 15, 2026
Both the ASCII diagram in README.md and the Mermaid diagram in
assets/architecture.mmd lagged the codebase by several releases. Update
them to reflect:

- Dynamic Sigma Pipelines (v0.10.0): new sources/ subsystem inside
  rsigma-runtime with SourceResolver, TemplateExpander, SourceCache,
  RefreshScheduler, extract languages (jq, JSONPath, CEL), and the
  flow back into the eval pipeline via ${source.*} template expansion.
- Matcher optimizer and eval prefilters (v0.11.0): Aho-Corasick and
  RegexSet batching plus CaseInsensitiveGroup inside compiler/, and
  the prefilter layers (RuleIndex, bloom trigram filter, cross-rule
  AC index via daachorse) inside engine/.
- DLQ as a sink target and broaden hot-reload to rules + pipelines.
- Builtin pipelines (ecs_windows, sysmon).
- Rename single-file module references (compiler.rs, engine.rs,
  correlation.rs) to the directory module style that landed in the
  v0.9.0 modularization PRs (#53, #54, #55).
- Add a legend explaining * = feature-gated and ** = requires the
  daachorse-index feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant