apr-sys-0.2.1/.cargo_vcs_info.json0000644000000001450000000000100124320ustar { "git": { "sha1": "14ecdeb29b73b40115c6bb629ce6e0e119c65425" }, "path_in_vcs": "apr-sys" }apr-sys-0.2.1/Cargo.lock0000644000000270670000000000100104210ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "aho-corasick" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "apr-sys" version = "0.2.1" dependencies = [ "bindgen", "system-deps", ] [[package]] name = "bindgen" version = "0.72.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f72209734318d0b619a5e0f5129918b848c416e122a3c4ce054e03cb87b726f" dependencies = [ "bitflags", "cexpr", "clang-sys", "itertools", "log", "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", "syn", ] [[package]] name = "bitflags" version = "2.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d" [[package]] name = "cexpr" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ "nom", ] [[package]] name = "cfg-expr" version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d458d63f0f0f482c8da9b7c8b76c21bd885a02056cc94c6404d861ca2b8206" dependencies = [ "smallvec", "target-lexicon", ] [[package]] name = "cfg-if" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "clang-sys" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", "libloading", ] [[package]] name = "either" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "glob" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "hashbrown" version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "itertools" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "libc" version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libloading" version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", "windows-targets", ] [[package]] name = "log" version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "memchr" version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "minimal-lexical" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "nom" version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", ] [[package]] name = "pkg-config" version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "prettyplease" version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", "syn", ] [[package]] name = "proc-macro2" version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] [[package]] name = "regex" version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "rustc-hash" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "serde" version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_spanned" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "syn" version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "system-deps" version = "7.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4be53aa0cba896d2dc615bd42bbc130acdcffa239e0a2d965ea5b3b2a86ffdb" dependencies = [ "cfg-expr", "heck", "pkg-config", "toml", "version-compare", ] [[package]] name = "target-lexicon" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" [[package]] name = "toml" version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", "toml_datetime", "toml_edit", ] [[package]] name = "toml_datetime" version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] [[package]] name = "toml_edit" version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", "winnow", ] [[package]] name = "unicode-ident" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "version-compare" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "windows-link" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-targets" version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ "windows-link", "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" [[package]] name = "windows_aarch64_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" [[package]] name = "windows_i686_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" [[package]] name = "windows_i686_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" [[package]] name = "windows_i686_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" [[package]] name = "windows_x86_64_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" [[package]] name = "windows_x86_64_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" [[package]] name = "windows_x86_64_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] apr-sys-0.2.1/Cargo.toml0000644000000022550000000000100104340ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" name = "apr-sys" version = "0.2.1" authors = ["Jelmer Vernooij "] build = "build.rs" autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "Low-level FFI bindings for Apache Portable Runtime" homepage = "https://github.com/jelmer/apr-rs" documentation = "https://docs.rs/apr-sys" readme = false license = "Apache-2.0" repository = "https://github.com/jelmer/apr-rs.git" [package.metadata.system-deps] apr-1 = "*" apr-util-1 = "*" [features] pool-debug = [] [lib] name = "apr_sys" path = "src/lib.rs" doctest = false [dependencies] [build-dependencies.bindgen] version = ">=0.60" [build-dependencies.system-deps] version = "7" apr-sys-0.2.1/Cargo.toml.orig000064400000000000000000000010231046102023000141050ustar 00000000000000[package] name = "apr-sys" version = "0.2.1" edition = "2021" authors = ["Jelmer Vernooij "] repository = "https://github.com/jelmer/apr-rs.git" homepage = "https://github.com/jelmer/apr-rs" license = "Apache-2.0" description = "Low-level FFI bindings for Apache Portable Runtime" documentation = "https://docs.rs/apr-sys" [lib] doctest = false [dependencies] [build-dependencies] bindgen = ">=0.60" system-deps = "7" [features] pool-debug = [] [package.metadata.system-deps] apr-1 = "*" "apr-util-1" = "*" apr-sys-0.2.1/build.rs000064400000000000000000000126151046102023000126740ustar 00000000000000extern crate bindgen; fn create_bindings( apr_path: &std::path::Path, apu_path: &std::path::Path, out_path: &std::path::Path, apr_include_paths: &[&std::path::Path], ) { // Generate bindings using bindgen let mut builder = bindgen::Builder::default(); // check if the pool-debug feature is present if std::env::var("CARGO_FEATURE_POOL_DEBUG").is_ok() { builder = builder.clang_arg("-DAPR_POOL_DEBUG"); } let bindings = builder .header(apr_path.join("apr.h").to_str().unwrap()) .header(apr_path.join("apr_allocator.h").to_str().unwrap()) .header(apr_path.join("apr_general.h").to_str().unwrap()) .header(apr_path.join("apr_errno.h").to_str().unwrap()) .header(apr_path.join("apr_pools.h").to_str().unwrap()) .header(apr_path.join("apr_version.h").to_str().unwrap()) .header(apr_path.join("apr_tables.h").to_str().unwrap()) .header(apr_path.join("apr_hash.h").to_str().unwrap()) .header(apr_path.join("apr_file_info.h").to_str().unwrap()) .header(apr_path.join("apr_file_io.h").to_str().unwrap()) .header(apr_path.join("apr_getopt.h").to_str().unwrap()) .header(apu_path.join("apr_uri.h").to_str().unwrap()) .header(apr_path.join("apr_time.h").to_str().unwrap()) .header(apu_path.join("apr_date.h").to_str().unwrap()) .header(apr_path.join("apr_version.h").to_str().unwrap()) .header(apu_path.join("apu_version.h").to_str().unwrap()) .header(apr_path.join("apr_strings.h").to_str().unwrap()) .header(apr_path.join("apr_thread_proc.h").to_str().unwrap()) .header(apr_path.join("apr_thread_mutex.h").to_str().unwrap()) .header(apr_path.join("apr_thread_cond.h").to_str().unwrap()) .header(apr_path.join("apr_dso.h").to_str().unwrap()) .header(apr_path.join("apr_env.h").to_str().unwrap()) .header(apr_path.join("apr_network_io.h").to_str().unwrap()) .header(apr_path.join("apr_mmap.h").to_str().unwrap()) .header(apr_path.join("apr_user.h").to_str().unwrap()) .header(apu_path.join("apr_md5.h").to_str().unwrap()) .header(apu_path.join("apr_sha1.h").to_str().unwrap()) .header(apu_path.join("apr_base64.h").to_str().unwrap()) .header(apu_path.join("apr_uuid.h").to_str().unwrap()) .header(apu_path.join("apr_strmatch.h").to_str().unwrap()) .header(apu_path.join("apr_xlate.h").to_str().unwrap()) .header(apu_path.join("apr_xml.h").to_str().unwrap()) .header(apu_path.join("apr_crypto.h").to_str().unwrap()) .header(apu_path.join("apr_queue.h").to_str().unwrap()) .header_contents("sys_socket.h", "#include ") .header_contents("sys_types.h", "#include ") .allowlist_file(".*/apr.h") .allowlist_file(".*/apr_general.h") .allowlist_file(".*/apr_allocator.h") .allowlist_file(".*/apr_version.h") .allowlist_file(".*/apr_errno.h") .allowlist_file(".*/apr_pools.h") .allowlist_file(".*/apr_tables.h") .allowlist_file(".*/apr_hash.h") .allowlist_file(".*/apr_file_info.h") .allowlist_file(".*/apr_file_io.h") .allowlist_file(".*/apr_getopt.h") .allowlist_file(".*/apr_uri.h") .allowlist_file(".*/apr_time.h") .allowlist_file(".*/apr_date.h") .allowlist_file(".*/apr_strings.h") .allowlist_file(".*/apr_version.h") .allowlist_file(".*/apu_version.h") .allowlist_file(".*/apr_thread_proc.h") .allowlist_file(".*/apr_thread_mutex.h") .allowlist_file(".*/apr_thread_cond.h") .allowlist_file(".*/apr_dso.h") .allowlist_file(".*/apr_env.h") .allowlist_file(".*/apr_network_io.h") .allowlist_file(".*/apr_mmap.h") .allowlist_file(".*/apr_user.h") .allowlist_file(".*/apr_md5.h") .allowlist_file(".*/apr_sha1.h") .allowlist_file(".*/apr_base64.h") .allowlist_file(".*/apr_uuid.h") .allowlist_file(".*/apr_strmatch.h") .allowlist_file(".*/apr_xlate.h") .allowlist_file(".*/apr_xml.h") .allowlist_file(".*/apr_crypto.h") .allowlist_file(".*/apr_queue.h") .allowlist_file(".*/apr_portable.h") .allowlist_file(".*/apr_support.h") .clang_args( apr_include_paths .iter() .map(|path| format!("-I{}", path.display())), ) .generate() .expect("Failed to generate bindings"); bindings .write_to_file(out_path.join("bindings.rs")) .expect("Failed to write bindings"); } fn main() { let deps = system_deps::Config::new().probe().unwrap(); let apr = deps.get_by_name("apr-1").unwrap(); let apr_util = deps.get_by_name("apr-util-1").unwrap(); let apr_path = apr .include_paths .iter() .find(|x| x.join("apr.h").exists()) .expect("Failed to find apr.h"); let apr_util_path = apr_util .include_paths .iter() .find(|x| x.join("apu.h").exists()) .expect("Failed to find apu.h"); let out_path = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap()); create_bindings( apr_path.as_path(), apr_util_path.as_path(), out_path.as_path(), apr.include_paths .iter() .map(|x| x.as_path()) .collect::>() .as_slice(), ); } apr-sys-0.2.1/src/lib.rs000064400000000000000000000003261046102023000131260ustar 00000000000000#![allow(bad_style)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(dead_code)] #![allow(improper_ctypes)] include!(concat!(env!("OUT_DIR"), "/bindings.rs"));