Announcement

Collapse
No announcement yet.

Rust Bindings For Kernel Workqueues Coming To Linux 6.7

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rust Bindings For Kernel Workqueues Coming To Linux 6.7

    Phoronix: Rust Bindings For Kernel Workqueues Coming To Linux 6.7

    Rust bindings are coming to the Linux kernel's workqueue (WQ) infrastructure that is used for deferring work to a kernel thread for asynchronous process execution...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Bindings... bindings... bindings.

    Then the work can start!

    The work of maintaining bindings!

    Comment


    • #3
      Rust looks more and more like a successor to C in some areas. I really hope it is happening because for many project using C already looked irrational in the 90s.

      Comment


      • #4
        Originally posted by patrick1946 View Post
        Rust looks more and more like a successor to C in some areas. I really hope it is happening because for many project using C already looked irrational in the 90s.
        Indeed, we're currently evaluating rust for micro controllers in battery management systems. The embassy framework is really nice. If I'm not mistaken there is no free C++ framework one could use for microcontrollers. Well, Arduino not counted.

        Comment


        • #5
          Originally posted by kpedersen View Post
          Bindings... bindings... bindings.

          Then the work can start!

          The work of maintaining bindings!

          So it has come to this.

          Comment


          • #6
            Originally posted by kpedersen View Post
            Bindings... bindings... bindings.

            Then the work can start!

            The work of maintaining bindings!

            Bindings are automatically generated, the real work are the safe abstractions. But the work invested in this API will save time for the users, so it is well invested time. 🤷‍♂️

            Comment


            • #7
              Originally posted by oleid View Post

              Bindings are automatically generated
              No they aren't. We live in the real world where code is more complex than swig/bindgen know what to do with.

              Just have a quick read through. You may have to ignore all the unsafe keywords cluttering the codebase.
              Last edited by kpedersen; 03 October 2023, 03:38 PM.

              Comment


              • #8
                No, we don't live in a world where bindings are more complex than rust-bindgen. It is commonly used for different libraries in the rust world for all the *-sys crates.
                It would seem bindgen is not used for the kernel, though. But that makes sense, it cuts down dependencies and makes things easier in this specific case.

                Originally posted by kpedersen View Post
                Just have a quick read through. You may have to ignore all the unsafe keywords cluttering the codebase.
                It is really exemplary how they document the requirements for safety.
                Last edited by oleid; 03 October 2023, 04:00 PM.

                Comment


                • #9
                  Originally posted by oleid View Post
                  It would seem bindgen is not used for the kernel, though. But that makes sense, it cuts down dependencies and makes things easier in this specific case.
                  Indeed. We don't want the Linux kernel to turn into a big crates.io style technical debt depot. My biggest worry about someone shoving in Rust bindings.

                  Originally posted by oleid View Post
                  It is really exemplary how they document the requirements for safety.
                  Language aside, it is a shame this isn't done for all the kernel. It could be.

                  Originally posted by oleid View Post
                  It is commonly used for different libraries in the rust world for all the *-sys crates.
                  Suffers the same limitations as SWIG that came before it. It gets 99% of the way there though, if people want to do that kind of stuff.

                  Comment


                  • #10
                    Originally posted by kpedersen View Post
                    Suffers the same limitations as SWIG that came before it. It gets 99% of the way there though, if people want to do that kind of stuff.
                    Do you have - by any chance - examples of the missing 1% in the case of bindgen? Also, keep in mind I'm only interested in C based libraries.

                    Comment

                    Working...
                    X