diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-02-25 10:05:05 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-02-25 10:05:05 +0900 |
commit | 63156d6c6b0a809a6db2d4ca1f494ef60f53bb55 (patch) | |
tree | 0fac3f4a2afb5c14ec77461639b4d345a60db5a9 | |
parent | aa0d9b3f9187413c05c586faa26617f73daf67c1 (diff) | |
download | hinawa-rs-63156d6c6b0a809a6db2d4ca1f494ef60f53bb55.tar.gz |
hinawa-sys: regenerate FFI crate
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | README.rst | 4 | ||||
-rw-r--r-- | hinawa/sys/Cargo.toml | 11 | ||||
-rw-r--r-- | hinawa/sys/src/lib.rs | 3 | ||||
-rw-r--r-- | hinawa/sys/tests/abi.rs | 18 | ||||
-rw-r--r-- | hinawa/sys/versions.txt | 4 |
5 files changed, 20 insertions, 20 deletions
@@ -45,8 +45,8 @@ Dependencies * FFI crate (``hinawa-sys``) * ``libc`` >= 0.2 - * ``glib-sys`` >= 0.18 - * ``gobject-sys`` >= 0.18 + * ``glib-sys`` >= 0.19 + * ``gobject-sys`` >= 0.19 * API crate (`hinawa`) diff --git a/hinawa/sys/Cargo.toml b/hinawa/sys/Cargo.toml index ccdc336..2915d56 100644 --- a/hinawa/sys/Cargo.toml +++ b/hinawa/sys/Cargo.toml @@ -4,7 +4,6 @@ edition = "2021" links = "hinawa" name = "hinawa-sys" version = "0.10.0" -# For publishing. authors = ["Takashi Sakamoto"] categories = ["external-ffi-bindings", "hardware-support", "os::linux-apis"] description = "FFI bindings for hinawa library" @@ -34,14 +33,8 @@ system-deps = "6" [dependencies] libc = "0.2" - -[dependencies.glib] -package = "glib-sys" -version = "0.18" - -[dependencies.gobject] -package = "gobject-sys" -version = "0.18" +glib-sys = "0.19" +gobject-sys = "0.19" [dev-dependencies] shell-words = "1.0.0" diff --git a/hinawa/sys/src/lib.rs b/hinawa/sys/src/lib.rs index 976994a..06927a1 100644 --- a/hinawa/sys/src/lib.rs +++ b/hinawa/sys/src/lib.rs @@ -13,6 +13,9 @@ )] #![cfg_attr(docsrs, feature(doc_cfg))] +use glib_sys as glib; +use gobject_sys as gobject; + #[allow(unused_imports)] use libc::{ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, diff --git a/hinawa/sys/tests/abi.rs b/hinawa/sys/tests/abi.rs index e40e031..d0683b5 100644 --- a/hinawa/sys/tests/abi.rs +++ b/hinawa/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/hinawa/sys/versions.txt b/hinawa/sys/versions.txt index 369e893..bec788b 100644 --- a/hinawa/sys/versions.txt +++ b/hinawa/sys/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 23d7c100187c) +Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de) from -from gir-files (https://github.com/gtk-rs/gir-files @ 6415239ef435) +from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b) |