#drm #linux #kms #unsafe #libdrm #unsafe-bindings

drm-rs

(WIP) libdrm bindings to be able to use Kernel Mode Setting on Linux

15 releases

Uses old Rust 2015

0.1.3 May 28, 2017
0.1.2 Oct 14, 2016
0.1.1 Sep 7, 2016
0.0.13 Jun 22, 2016

#1072 in Hardware support

Download history 32/week @ 2024-03-13 23/week @ 2024-03-20 29/week @ 2024-03-27 37/week @ 2024-04-03 15/week @ 2024-04-10 27/week @ 2024-04-17 23/week @ 2024-04-24 21/week @ 2024-05-01 29/week @ 2024-05-08 26/week @ 2024-05-15 22/week @ 2024-05-22 28/week @ 2024-05-29 17/week @ 2024-06-05 17/week @ 2024-06-12 19/week @ 2024-06-19 19/week @ 2024-06-26

75 downloads per month
Used in 5 crates (3 directly)

MIT license

110KB
2K SLoC

libdrm-rs

This crate contains bindings for libdrm functionality in linux. This is a WIP. Currently it exposes bindings for:

  • drm.h
  • drm_mode.h
  • xf86drm.h
  • xf86drmMode.h

This is a learning experience for me, so mistakes will be made. If you have any suggestions, let me know.

The purpose of this crate is to provide low-level bindings that map directly to the libraries in order to be able to maintain compatibility as new versions of libdrm appear. I plan to work on safer, more idiomatic, higher level constructs once I've tested this enough but, for the moment, this will remain as close to 1:1 map as possible.

This was hand-made as bindgen had issues with the files and I didn't test other generators.

As I said, this is a learning experience as I have very little experience with Rust. If you see something wrong, please let me know.

Dependencies

~205KB