Skip to content

refactor: move event handling interface to core - #3438

Draft
adr1anh wants to merge 3 commits into
nextfrom
adr1anh/move-event-handler-to-core
Draft

refactor: move event handling interface to core#3438
adr1anh wants to merge 3 commits into
nextfrom
adr1anh/move-event-handler-to-core

Conversation

@adr1anh

@adr1anh adr1anh commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Describe your changes

Moves the event-handler interface and declarative advice mutations into miden-core so libraries can define handlers without depending on miden-processor.

  • Adds the handler-facing EventContext with explicit event identity, active-context memory access, idiomatic accessor names, and documented snapshot allocation.
  • Moves ExecutionOptions into miden-core while preserving the miden-processor re-export.
  • Moves HostLibrary into miden-mast-package.
  • Keeps common processor handler implementations working through deprecated compatibility accessors isolated in a documented compatibility module.
  • Updates built-in core-library handlers and processor hosts to the new interface.
  • Makes EventContext usable across await points by requiring Sync providers.

Migration

The generated documentation for miden_core::events::compatibility contains the migration guide, old-to-new accessor mapping, intentional differences, and before/after examples.

Validation

  • Workspace clippy passed with warnings denied.
  • Workspace formatting check passed.
  • Affected crates passed cargo check.
  • miden-core: 224 tests passed.
  • Processor event-handler compatibility and async-host tests: 4 tests passed.
  • Full heavy local integration testing was intentionally not rerun; this is a draft PR and CI will provide the broader sweep.

Checklist before requesting a review

  • Branch created from next according to naming convention.
  • Commits are signed and follow project conventions.
  • Tests added or updated for the changed interface.
  • Documentation and migration guidance updated.
  • No changelog required for this internal refactor.

@adr1anh adr1anh added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant