Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.16.0 release, with updated drm-rs, and fixed use_bindgen feature #41

Merged
merged 5 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- run: sudo apt-get install -y libdrm-dev libwayland-dev
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.65.0
toolchain: 1.66.0
profile: minimal
components: clippy
default: true
Expand All @@ -78,12 +78,12 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_1_65-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-cargo-rust_1_66-${{ hashFiles('**/Cargo.toml') }}
- name: Build cache
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-build-rust_1_65-check-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-build-rust_1_66-check-${{ hashFiles('**/Cargo.toml') }}
- name: Downgrade to MSRV package versions
run: cargo update -p home --precise 0.5.5
- name: Clippy check
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.16.0

- Update drm-rs to 0.14
- Fix `use_bindgen` feature

## 0.15.0

- Update drm-rs to 0.12
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "libgbm bindings for rust"
license = "MIT"
documentation = "https://docs.rs/gbm"
repository = "https://github.com/Smithay/gbm.rs"
version = "0.15.0"
version = "0.16.0"
keywords = ["wayland", "gbm", "drm", "bindings"]
categories = ["external-ffi-bindings"]
authors = ["Victoria Brekenfeld <[email protected]>"]
Expand All @@ -21,7 +21,7 @@ version = "0.3.0"
path = "./gbm-sys"

[dependencies.drm]
version = "0.12.0"
version = "0.14.0"
optional = true

[dependencies.wayland-server]
Expand All @@ -42,7 +42,7 @@ features = ["derive"]
optional = true

[dev-dependencies.drm]
version = "0.12.0"
version = "0.14.0"

[features]
default = ["import-wayland", "import-egl", "drm-support"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ provided through the `drm-support` feature.
Add to your Cargo.toml

```toml
gbm = "0.15.0"
gbm = "0.16.0"
```

## Example
Expand Down
6 changes: 3 additions & 3 deletions gbm-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#[cfg(feature = "gen")]
#[cfg(feature = "use_bindgen")]
extern crate bindgen;

#[cfg(not(feature = "gen"))]
#[cfg(not(feature = "use_bindgen"))]
fn main() {}

#[cfg(feature = "gen")]
#[cfg(feature = "use_bindgen")]
fn main() {
use std::{env, path::Path};

Expand Down
4 changes: 2 additions & 2 deletions gbm-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
// it is not so.
#![cfg_attr(test, allow(deref_nullptr))]

#[cfg(feature = "gen")]
#[cfg(feature = "use_bindgen")]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

#[cfg(not(feature = "gen"))]
#[cfg(not(feature = "use_bindgen"))]
include!("bindings.rs");

#[link(name = "gbm")]
Expand Down
2 changes: 2 additions & 0 deletions src/buffer_object.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::unnecessary_cast)]

use crate::{AsRaw, Device, DeviceDestroyedError, Format, Modifier, Ptr, WeakPtr};

#[cfg(feature = "drm-support")]
Expand Down Expand Up @@ -40,7 +42,7 @@
///
/// Use [`Device::is_format_supported()`] to check if the combination of format
/// and use flags are supported
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize), serde(transparent))]

Check warning on line 45 in src/buffer_object.rs

View workflow job for this annotation

GitHub Actions / check-minimal

non-local `impl` definition, `impl` blocks should be written at the same level as their item

Check warning on line 45 in src/buffer_object.rs

View workflow job for this annotation

GitHub Actions / check-minimal

non-local `impl` definition, `impl` blocks should be written at the same level as their item
#[derive(Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug)]
pub struct BufferObjectFlags: u32 {
/// Buffer is going to be presented to the screen using an API such as KMS
Expand Down
8 changes: 4 additions & 4 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl<T: AsFd> Device<T> {
let ptr = unsafe {
ffi::gbm_bo_import(
*self.ffi,
ffi::GBM_BO_IMPORT_WL_BUFFER as u32,
ffi::GBM_BO_IMPORT_WL_BUFFER,
buffer.id().as_ptr() as *mut _,
usage.bits(),
)
Expand Down Expand Up @@ -298,7 +298,7 @@ impl<T: AsFd> Device<T> {
) -> IoResult<BufferObject<U>> {
let ptr = ffi::gbm_bo_import(
*self.ffi,
ffi::GBM_BO_IMPORT_EGL_IMAGE as u32,
ffi::GBM_BO_IMPORT_EGL_IMAGE,
buffer,
usage.bits(),
);
Expand Down Expand Up @@ -337,7 +337,7 @@ impl<T: AsFd> Device<T> {
let ptr = unsafe {
ffi::gbm_bo_import(
*self.ffi,
ffi::GBM_BO_IMPORT_FD as u32,
ffi::GBM_BO_IMPORT_FD,
&mut fd_data as *mut ffi::gbm_import_fd_data as *mut _,
usage.bits(),
)
Expand Down Expand Up @@ -385,7 +385,7 @@ impl<T: AsFd> Device<T> {
let ptr = unsafe {
ffi::gbm_bo_import(
*self.ffi,
ffi::GBM_BO_IMPORT_FD_MODIFIER as u32,
ffi::GBM_BO_IMPORT_FD_MODIFIER,
&mut fd_data as *mut ffi::gbm_import_fd_modifier_data as *mut _,
usage.bits(),
)
Expand Down
Loading