Skip to content

Commit 4ec0178

Browse files
Merge pull request #75 from andrewdavidmackenzie/release_0-11
Release of 0.11.1 for publishing to crates.io
2 parents 04b290e + ad247f8 commit 4ec0178

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libproc"
3-
version = "0.10.1"
3+
version = "0.11.1"
44
description = "A library to get information about running processes - for Mac OS X and Linux"
55
authors = ["Andrew Mackenzie <[email protected]>"]
66
repository = "https://github.com/andrewdavidmackenzie/libproc-rs"

build.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
#[cfg(target_os = "macos")]
22
fn main() {
3+
use std::env;
4+
use std::path::Path;
5+
36
let bindings = bindgen::builder()
47
.header_contents("libproc_rs.h", "#include <libproc.h>")
58
.generate()
69
.expect("Failed to build libproc bindings");
710

11+
let output_path = Path::new(&env::var("OUT_DIR").expect("OUT_DIR env var was not defined"))
12+
.join("osx_libproc_bindings.rs");
13+
814
bindings
9-
.write_to_file("src/osx_libproc_bindings.rs")
15+
.write_to_file(output_path)
1016
.expect("Failed to write libproc bindings");
1117
}
1218

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ extern crate libc;
1010
extern crate errno;
1111

1212
pub mod libproc;
13+
1314
#[cfg(target_os = "macos")]
1415
#[allow(warnings, missing_docs)]
15-
mod osx_libproc_bindings;
16+
mod osx_libproc_bindings {
17+
include!(concat!(env!("OUT_DIR"), "/osx_libproc_bindings.rs"));
18+
}

0 commit comments

Comments
 (0)