Skip to content

Map out data notifications in the rust api #6293

Closed

Description

@greaka

What is the feature you'd like to have?
BNBinaryDataNotification would allow me to subscribe to data events emitted by BVs.

Is your feature request related to a problem?
I would like to write plugins using that api.

Are any alternative solutions acceptable?
Lot's of ideas on how to implement it, but the quick and easy one is probably preferable at this time.

Additional Information:
A quick and easy solution would be to expose the notifier as a trait and on callback init/register check for fn ptr equality for impls compared to a dummy struct to only subscribe to what's implemented.

Activity

  1. self-assigned this
    on Jan 1, 2025
  2. added
    Effort: LowIssues require < 1 week of work
    Impact: MediumIssue is impactful with a bad, or no, workaround
    Effort: TrivialIssues require < 1 day of work
    on Jan 1, 2025
  3. added this to the Gallifrey milestone on Jan 1, 2025
  4. modified the milestones: Gallifrey, H on Feb 10, 2025
  5. emesare commented on Mar 13, 2025

    @emesare
    Member

    For when this gets tackled we want to make sure that we can pass nullptrs to notification callbacks we are not registering, otherwise we will end up jumping to and from the core frequently, this is not the end of the world but here especially is crucial.

    For context a lot of these callback structs are opt-in so passing nullptr to the field onMySymbolRegistered or whatever will mean that you are not interested in receiving that and the core will not add that to the list of functions to call.

  6. rbran commented on Apr 1, 2025

    @rbran
    Contributor

    The PR #6543 avoid the unnecessary jumping from core to rust if unimplemented, but at a cost:

    For the custom implementation, it's more complex and require some boiler plate on the user part, this can be reduced once the feature associated_type_defaults is stabilize.

    For the closure implementation, the call require one extra indirection due to the dyn FnMut.

  7. linked a pull request that will close this issueImplement DataNotification for Rust #6543on Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Component: Rust APIIssue needs changes to the Rust APIEffort: TrivialIssues require < 1 day of workImpact: MediumIssue is impactful with a bad, or no, workaround

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions