-
Notifications
You must be signed in to change notification settings - Fork 248
[Rust] Type-safe workflow and activity configuration #7254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Other than the comments I left (all of which are not blocking, pick what you want) LGTM |
emesare
reviewed
Aug 11, 2025
emesare
reviewed
Aug 11, 2025
44c105e
to
831fff1
Compare
Updated to:
|
831fff1
to
af3f09f
Compare
af3f09f
to
589994e
Compare
Fixed the formatting issues. |
emesare
approved these changes
Aug 12, 2025
This makes it possible to see what structure the configuration takes and eliminates errors due to typos in JSON string literals.
`Workflow::new` is replaced by `Workflow::build` that returns a `Builder` type that supports the operations that mutate a workflow, such as registering activities. `Workflow::instance` is replaced by `Workflow::get` to make clear that it is intended to look up an existing workflow. `Workflow::cloned` is introduced to wrap the common pattern of retrieving an existing workflow and cloning it with the same name in order to modify it. `Builder::activity_before` / `Builder::activity_after` are introduced to wrap the common pattern of registering an activity then inserting it before or after a given activity.
589994e
to
a898e96
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This introduces
binaryninja::workflow::activity::Config
and related types that can be used for describing the configuration of workflow activity. This makes it possible to see what configuration options are available and eliminates errors due to typos in JSON string literals. Subsequent commits update the SVD and Warp plug-ins to use the new types.I'm open to feedback on naming and exactly where this should live. The nested
activity
module isn't great, but it makes clear that this is for configuring activities and not the workflow more generally.