Skip to content

Generalize Bindgen #115

@d3zd3z

Description

@d3zd3z

Currently, in order to add new bindings to zephyr, a user must modify a few files within the zephyr-lang-rust project, specifically within the zephyr-sys crate. This includes

  • wrapper.h: Add include directives for new apis. In addition, some #define values that are expressions have to be explicitly declared via consts for bindgen to know they have constant values and be made visible. Occasionally, static functions might also have to be written.
  • build.rs: There is a list of patterns of symbols that bindgen generates bindings for. Depending on the names of the API entries, this list may need to be extended.

The goal here is for an application to be able to extend both of these entirely within the application crate. The header could probably be done with an extra include that is brought in if it is present. The extra binding rules could either come from a text file, or build could be generalized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions