Skip to content

Commit

Permalink
try to fix docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
oberrich committed Apr 10, 2024
1 parent fb25b7f commit 2e78b2e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "phnt"
version = "0.0.8"
version = "0.0.10"
license = "MIT"
authors = ["oberrich <[email protected]>"]
repository = "https://github.com/oberrich/phnt-rs"
Expand All @@ -12,9 +12,10 @@ description = "Rust bindings to the System Informer's (formerly known as Process

[package.metadata.docs.rs]
all-features = true
default-target = "x86_64-pc-windows-msvc"
default-target = ""
targets = []


[build-dependencies]
windows.features = ["Win32_Foundation"]
windows-targets = "0.52.0"
Expand Down
12 changes: 7 additions & 5 deletions src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ impl BindgenConfig {
.size_t_is_usize(true)
.allowlist_recursively(true)
.merge_extern_blocks(true)
// TODO(improve): Build C++ manually and pass -fkeep-inline-functions/-fno-inline-functions
// see https://rust-lang.github.io/rust-bindgen/faq.html#why-isnt-bindgen-generating-bindings-to-inline-functions
.generate_inline_functions(true)
.vtable_generation(true)
.generate_comments(true)
Expand All @@ -108,6 +110,11 @@ impl BindgenConfig {
}

fn main() {
if cfg!(doc) {
println!("Skipping regeneration of bindings for docs.");
return;
}

std::process::Command::new("git")
.args(["submodule", "update", "--remote", "--recursive"])
.output()
Expand All @@ -119,11 +126,6 @@ fn main() {
"\\deps\\phnt-nightly"
));

if cfg!(doc) {
println!("Skipping regeneration of bindings for docs.");
return;
}

let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("generated.rs");

BindgenConfig::default()
Expand Down

0 comments on commit 2e78b2e

Please sign in to comment.