diff --git a/Cargo.lock b/Cargo.lock index 373b74a..154a81f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,80 +11,12 @@ dependencies = [ "memchr", ] -[[package]] -name = "anstyle" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" - [[package]] name = "anyhow" version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" -[[package]] -name = "aquamarine" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941c39708478e8eea39243b5983f1c42d2717b3620ee91f4a52115fd02ac43f" -dependencies = [ - "itertools 0.9.0", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "autocxx" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae6bbbec65d053b6fd803a4d63d21d0bd4a92f84f917847f216fec8bb8ae6ae" -dependencies = [ - "aquamarine", - "autocxx-macro", - "cxx", - "moveit", -] - -[[package]] -name = "autocxx-macro" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c26712d744702e6fe61fdc618cc107a581a009ec8bfaffc67707d82501dbd907" -dependencies = [ - "autocxx-parser", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "autocxx-parser" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bcfc473ec409e612fb0e0c5c4a1b5b7611eca2bac71bc27b3cda98f15a25124" -dependencies = [ - "indexmap 1.9.3", - "itertools 0.10.5", - "log", - "once_cell", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn 2.0.117", - "thiserror", -] - [[package]] name = "bindgen" version = "0.72.1" @@ -94,14 +26,14 @@ dependencies = [ "bitflags", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools", "log", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.117", + "syn", ] [[package]] @@ -146,43 +78,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "4.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" -dependencies = [ - "clap_builder", -] - -[[package]] -name = "clap_builder" -version = "4.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" -dependencies = [ - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_lex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" - -[[package]] -name = "codespan-reporting" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" -dependencies = [ - "serde", - "termcolor", - "unicode-width", -] - [[package]] name = "ctor" version = "0.6.3" @@ -199,68 +94,6 @@ version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" -[[package]] -name = "cxx" -version = "1.0.194" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747d8437319e3a2f43d93b341c137927ca70c0f5dabeea7a005a73665e247c7e" -dependencies = [ - "cc", - "cxx-build", - "cxxbridge-cmd", - "cxxbridge-flags", - "cxxbridge-macro", - "foldhash 0.2.0", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.194" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0f4697d190a142477b16aef7da8a99bfdc41e7e8b1687583c0d23a79c7afc1e" -dependencies = [ - "cc", - "codespan-reporting", - "indexmap 2.13.0", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.117", -] - -[[package]] -name = "cxxbridge-cmd" -version = "1.0.194" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0956799fa8678d4c50eed028f2de1c0552ae183c76e976cf7ca8c4e36a7c328" -dependencies = [ - "clap", - "codespan-reporting", - "indexmap 2.13.0", - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.194" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23384a836ab4f0ad98ace7e3955ad2de39de42378ab487dc28d3990392cb283a" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.194" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6acc6b5822b9526adfb4fc377b67128fdd60aac757cc4a741a6278603f763cf" -dependencies = [ - "indexmap 2.13.0", - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "doxygen-bindgen" version = "0.1.3" @@ -325,12 +158,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - [[package]] name = "futures-core" version = "0.3.32" @@ -385,19 +212,13 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "foldhash 0.1.5", + "foldhash", ] [[package]] @@ -418,17 +239,6 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - [[package]] name = "indexmap" version = "2.13.0" @@ -441,24 +251,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -468,15 +260,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.18" @@ -505,15 +288,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "link-cplusplus" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f78c730aaa7d0b9336a299029ea49f9ee53b0ed06e9202e8cb7db9bae7b8c82" -dependencies = [ - "cc", -] - [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -547,15 +321,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "moveit" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87d7335204cb6ef7bd647fa6db0be3e4d7aa25b5823a7aa030027ddf512cefba" -dependencies = [ - "cxx", -] - [[package]] name = "nixide" version = "0.1.0" @@ -572,11 +337,9 @@ dependencies = [ name = "nixide-sys" version = "0.1.0" dependencies = [ - "autocxx", "bindgen", "cc", "doxygen-bindgen", - "itertools 0.14.0", "pkg-config", "serial_test", ] @@ -639,31 +402,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.117", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", + "syn", ] [[package]] @@ -762,12 +501,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scratch" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68f2ec51b097e4c1a75b681a8bec621909b5e91f15bb7b840c4f2f7b01148b2" - [[package]] name = "sdd" version = "3.0.10" @@ -787,7 +520,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", - "serde_derive", ] [[package]] @@ -807,7 +539,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -846,7 +578,7 @@ checksum = "0a7d91949b85b0d2fb687445e448b40d322b6b3e4af6b44a29b21d9a5f33e6d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -873,23 +605,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4af28eeb7c18ac2dbdb255d40bee63f203120e1db6b0024b177746ebec7049c1" -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.117" @@ -914,59 +629,18 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "unicode-ident" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" -[[package]] -name = "unicode-width" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" - [[package]] name = "unicode-xid" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - [[package]] name = "wasip2" version = "1.0.2+wasi-0.2.9" @@ -1002,7 +676,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ "anyhow", - "indexmap 2.13.0", + "indexmap", "wasm-encoder", "wasmparser", ] @@ -1015,19 +689,10 @@ checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ "bitflags", "hashbrown 0.15.5", - "indexmap 2.13.0", + "indexmap", "semver", ] -[[package]] -name = "winapi-util" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" -dependencies = [ - "windows-sys", -] - [[package]] name = "windows-link" version = "0.2.1" @@ -1071,9 +736,9 @@ checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" dependencies = [ "anyhow", "heck", - "indexmap 2.13.0", + "indexmap", "prettyplease", - "syn 2.0.117", + "syn", "wasm-metadata", "wit-bindgen-core", "wit-component", @@ -1089,7 +754,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.117", + "syn", "wit-bindgen-core", "wit-bindgen-rust", ] @@ -1102,7 +767,7 @@ checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", "bitflags", - "indexmap 2.13.0", + "indexmap", "log", "serde", "serde_derive", @@ -1121,7 +786,7 @@ checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" dependencies = [ "anyhow", "id-arena", - "indexmap 2.13.0", + "indexmap", "log", "semver", "serde", diff --git a/nixide-sys/Cargo.toml b/nixide-sys/Cargo.toml index e6d876f..0c021dd 100644 --- a/nixide-sys/Cargo.toml +++ b/nixide-sys/Cargo.toml @@ -30,10 +30,8 @@ nix-main-c = [] [build-dependencies] bindgen = { default-features = false, features = [ "logging", "runtime" ], version = "0.72.1" } doxygen-bindgen = "0.1.3" -itertools = "0.14.0" pkg-config.workspace = true cc.workspace = true -autocxx = "0.30.0" [dev-dependencies] serial_test = "3.4.0" diff --git a/nixide-sys/build.rs b/nixide-sys/build.rs index ede5d4f..1fee802 100644 --- a/nixide-sys/build.rs +++ b/nixide-sys/build.rs @@ -2,7 +2,6 @@ use std::path::PathBuf; use std::{env, fs}; use bindgen::callbacks::ParseCallbacks; -use itertools::Itertools; #[derive(Debug)] struct DoxygenCallbacks; @@ -19,7 +18,6 @@ impl ParseCallbacks for DoxygenCallbacks { } } -// WARNING: NOTE: the random panic occurs when you're missing imports!! const LIBS: &[&'static str] = &[ #[cfg(feature = "nix-util-c")] "nix-util-c", @@ -39,32 +37,26 @@ fn main() { // Invalidate the built crate if the binding headers change // println!("cargo::rerun-if-changed=include"); - let lib_args: Vec = vec![ /* EXTRA ARGS */ ] - .into_iter() - .map(|s: &str| s.to_owned()) - .chain( - LIBS.iter() - .map(|&name| { - let lib = pkg_config::probe_library(name) - .expect(&format!("Unable to find .pc file for {}", name)); + let lib_args: Vec = LIBS + .iter() + .map(|&name| { + let lib = pkg_config::probe_library(name) + .expect(&format!("Unable to find .pc file for {}", name)); - for p in lib.link_files { - println!("cargo::rustc-link-lib={}", p.display()); - } + for p in lib.link_files { + println!("cargo::rustc-link-lib={}", p.display()); + } - lib.include_paths - .into_iter() - .map(|p| format!("-I{}", p.display())) - }) - .flatten(), - ) - .unique() + lib.include_paths + .into_iter() + .map(|p| format!("-I{}", p.display())) + }) + .flatten() + .chain(vec!["-Wall".to_owned(), "-xc++".to_owned()]) .collect(); - dbg!(&lib_args); - let mut builder = bindgen::Builder::default() - // .enable_cxx_namespaces() + // .clang_arg("") // libnix uses c++23 .clang_args(lib_args) .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) // Add `doxygen_bindgen` callbacks diff --git a/nixide-sys/include/nix-expr.h b/nixide-sys/include/nix-expr.h index 6660867..02f48ea 100644 --- a/nixide-sys/include/nix-expr.h +++ b/nixide-sys/include/nix-expr.h @@ -3,7 +3,6 @@ // Nix C API for the Nix expressions evaluator. #include -// #include // Nix C API for value manipulation. // diff --git a/nixide-sys/include/nix-fetchers.h b/nixide-sys/include/nix-fetchers.h index 48858cc..805a84b 100644 --- a/nixide-sys/include/nix-fetchers.h +++ b/nixide-sys/include/nix-fetchers.h @@ -4,6 +4,5 @@ // Nix C API for fetcher operations. // #include -// #include #endif diff --git a/nixide-sys/include/nix-flake.h b/nixide-sys/include/nix-flake.h index 1340fa4..5bd3d3b 100644 --- a/nixide-sys/include/nix-flake.h +++ b/nixide-sys/include/nix-flake.h @@ -4,6 +4,5 @@ // Nix C API for flake support. // #include -// #include #endif diff --git a/nixide-sys/include/nix-store.h b/nixide-sys/include/nix-store.h index 3252ece..8ad9413 100644 --- a/nixide-sys/include/nix-store.h +++ b/nixide-sys/include/nix-store.h @@ -4,6 +4,5 @@ // Nix C API for store operations. // #include -// #include #endif diff --git a/nixide-sys/include/nix-util.h b/nixide-sys/include/nix-util.h index 9770d77..59690ee 100644 --- a/nixide-sys/include/nix-util.h +++ b/nixide-sys/include/nix-util.h @@ -8,6 +8,5 @@ // the Nix C APIs for error handling. // #include -// #include #endif