Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-28918

Bindgen evaluation of function-like macros in #defines that evaluate to constants

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • stratisd
    • None
    • rhel-sst-logical-storage
    • ssg_filesystems_storage_and_HA
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • None

      Goal

      • Providing better ergonomics in bindgen is a shared goal across many projects using Rust to interface with C. Two notable examples of projects that are impacted by this are the Stratis project and the Rust for Linux project. In the Stratis project, adding #define definitions of constants that use function-like macros in libcryptsetup broke builds for stratisd due to the constants disappearing from our libcryptsetup-rs bindings. This work would allow us to remove these workarounds and would prevent future bindings across the ecosystem from failing similarly.

      Acceptance Criteria

      A list of verification conditions, successful functional tests, or expected outcomes in order to declare this story/task successfully completed.

      • Performance on kernel header constants as close to 1s as possible (currently around 3.5s, down from 2m)
      • libcryptsetup-rs compiles when using the bindgen code without the workaround patch we added
      • Accepted by upstream

       

      Upstream PR: https://github.com/rust-lang/rust-bindgen/pull/2779

              jbaublit@redhat.com John Baublitz
              jbaublit@redhat.com John Baublitz
              stratis-team stratis-team
              storage-qe storage-qe
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: