Skip to content

Commit

Permalink
Merge pull request #156 from forkgull/no-libc-in-sys
Browse files Browse the repository at this point in the history
Use core::ffi instead of libc for C types
  • Loading branch information
Slabity authored Aug 23, 2023
2 parents 5e4eb87 + 8d4e8e6 commit f238bdc
Show file tree
Hide file tree
Showing 11 changed files with 611 additions and 616 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
sudo apt-get install -y libdrm-dev
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.63.0
toolchain: 1.64.0
profile: minimal
components: clippy
default: true
Expand All @@ -80,12 +80,12 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_1.63.0-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-cargo-rust_1.64.0-${{ hashFiles('**/Cargo.toml') }}
- name: Build cache
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-build-rust_1.63.0-check-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-build-rust_1.64.0-check-${{ hashFiles('**/Cargo.toml') }}
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.9.0"
license = "MIT"
authors = ["Tyler Slabinski <[email protected]>", "Victoria Brekenfeld <[email protected]>"]
exclude = [".gitignore", ".github"]
rust-version = "1.63"
rust-version = "1.64"
resolver = "2" # Required to separate dev-dependencies.nix features

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion drm-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository = "https://github.com/Smithay/drm-rs"
version = "0.5.0"
license = "MIT"
authors = ["Tyler Slabinski <[email protected]>"]
rust-version = "1.63"
rust-version = "1.64"

[dependencies]
drm-sys = { path = "drm-sys", version = "0.4.0" }
Expand Down
5 changes: 1 addition & 4 deletions drm-ffi/drm-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ version = "0.4.0"
authors = ["Tyler Slabinski <[email protected]>"]
license = "MIT"
build = "build.rs"
rust-version = "1.63"

[dependencies]
libc = { version = "^0.2.29", default-features = false }
rust-version = "1.64"

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion drm-ffi/drm-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mod use_bindgen {
.map(|path| "-I".to_string() + &path.into_os_string().into_string().unwrap()),
)
.header_contents("bindings.h", contents)
.ctypes_prefix("libc")
.ctypes_prefix("core::ffi")
.with_codegen_config(config)
.prepend_enum_name(false)
.layout_tests(false)
Expand Down
2 changes: 0 additions & 2 deletions drm-ffi/drm-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]

extern crate libc;

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

Expand Down
Loading

0 comments on commit f238bdc

Please sign in to comment.