Skip to content

Commit

Permalink
Merge pull request #70 from ids1024/v0.9.0
Browse files Browse the repository at this point in the history
V0.9.0
  • Loading branch information
Drakulix authored Jan 19, 2024
2 parents c207c68 + 8be9d96 commit 22a33e4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.9.0

- Update to bitflags 2.x and udev 0.8
- Don't require generated bindings for specific OS/architecture to build

## 0.8.3

- Fixed bitflags test for config entries (see https://github.com/Smithay/input.rs/pull/54, thanks @ids1024)
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "libinput bindings for rust"
license = "MIT"
documentation = "https://docs.rs/input"
repository = "https://github.com/Drakulix/input.rs"
version = "0.8.3"
version = "0.9.0"
keywords = ["wayland", "input", "bindings"]
categories = ["external-ffi-bindings"]
authors = ["Drakulix (Victoria Brekenfeld)"]
Expand All @@ -31,7 +31,7 @@ rustix = { version = "0.38", features = ["event"] }

[features]
default = ["udev", "log", "libinput_1_21"]
gen = ["input-sys/gen"]
use_bindgen = ["input-sys/use_bindgen"]
libinput_1_11 = ["input-sys/libinput_1_11"]
libinput_1_14 = ["input-sys/libinput_1_14", "libinput_1_11"]
libinput_1_15 = ["input-sys/libinput_1_15", "libinput_1_14"]
Expand Down
4 changes: 2 additions & 2 deletions input-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ optional = true

[features]
default = ["libinput_1_21"]
gen = ["bindgen", "proc-macro2", "regex"]
update_bindings = ["gen"]
use_bindgen = ["bindgen", "proc-macro2", "regex"]
update_bindings = ["use_bindgen"]
libinput_1_11 = []
libinput_1_14 = []
libinput_1_15 = []
Expand Down
6 changes: 3 additions & 3 deletions input-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[cfg(feature = "gen")]
#[cfg(feature = "use_bindgen")]
extern crate bindgen;

use std::{env, path::Path};
Expand All @@ -25,7 +25,7 @@ fn lib_versions() -> impl Iterator<Item = &'static (u8, u8, u8)> {
.chain(Some(&LIB_VERSIONS[LIB_VERSIONS.len() - 1]))
}

#[cfg(not(feature = "gen"))]
#[cfg(not(feature = "use_bindgen"))]
fn main() {
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
Expand All @@ -49,7 +49,7 @@ fn main() {
);
}

#[cfg(feature = "gen")]
#[cfg(feature = "use_bindgen")]
fn main() {
let version = lib_versions().next().unwrap();
println!(
Expand Down
4 changes: 2 additions & 2 deletions input-sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#![allow(non_camel_case_types, non_upper_case_globals)]

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

#[cfg(not(feature = "gen"))]
#[cfg(not(feature = "use_bindgen"))]
include!(concat!(
"bindings/gen_",
env!("LIBINPUT_VERSION_STR"),
Expand Down

0 comments on commit 22a33e4

Please sign in to comment.