7 Commits

Author SHA1 Message Date
6e0ecda035 Merge branch 'master' of github.com:szymon-jozef/libnotify-rs 2026-10-03 21:40:05 +02:00
f10ff06a89 chore: version bump 2026-10-03 21:39:58 +02:00
Szymon
f170e8c710 Merge pull request #8 from szymon-jozef/fix/compilation-error
fix: set messages next to crash during build
2026-10-03 21:37:58 +02:00
6d8672537f fix: set messages next to crash during build 2026-10-03 21:37:45 +02:00
Szymon
4f20307a7b Merge pull request #7 from szymon-jozef/docs/error-docs
feat: add specific error docs
2026-10-03 21:36:07 +02:00
Szymon
edaf6e2787 Merge pull request #6 from szymon-jozef/fix/compile-only-on-linux
fix: compile only on linux
2026-10-03 21:29:45 +02:00
043b6e93c8 fix: compile only on linux 2026-10-03 21:24:05 +02:00
4 changed files with 10 additions and 4 deletions

2
Cargo.lock generated
View File

@@ -336,7 +336,7 @@ dependencies = [
[[package]] [[package]]
name = "libnotify-rs" name = "libnotify-rs"
version = "0.3.0" version = "0.3.1"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"clap", "clap",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "libnotify-rs" name = "libnotify-rs"
version = "0.3.0" version = "0.3.1"
edition = "2024" edition = "2024"
authors = [ "szymon_jozef"] authors = [ "szymon_jozef"]
description = "Rust bindings for libnotify" description = "Rust bindings for libnotify"

View File

@@ -2,7 +2,9 @@ use std::env;
use std::path::PathBuf; use std::path::PathBuf;
fn main() { fn main() {
let library = pkg_config::Config::new().probe("libnotify").unwrap(); let library = pkg_config::Config::new()
.probe("libnotify")
.expect("Cannot locate libnotify. Is it installed?");
let paths = library let paths = library
.include_paths .include_paths
@@ -17,7 +19,8 @@ fn main() {
.generate() .generate()
.expect("Unable to generate bindings"); .expect("Unable to generate bindings");
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); let out_path =
PathBuf::from(env::var("OUT_DIR").expect("Out $OUT_DIR not set. Perhaps a bindgen error?"));
bindings bindings
.write_to_file(out_path.join("bindings.rs")) .write_to_file(out_path.join("bindings.rs"))

View File

@@ -17,6 +17,9 @@
#![allow(non_snake_case)] #![allow(non_snake_case)]
#![warn(missing_docs)] #![warn(missing_docs)]
#[cfg(not(target_os = "linux"))]
compile_error!("Libnotify-rs only supports linux");
/// Basic libnotify rust wrapper /// Basic libnotify rust wrapper
pub mod api; pub mod api;
/// Higher level abstraction over api /// Higher level abstraction over api