subversion-sys-0.1.1/.cargo_vcs_info.json0000644000000001541046102023000140700ustar { "git": { "sha1": "a94b52f8bc64b50c4d2b7b63f89144066414b10f" }, "path_in_vcs": "subversion-sys" }subversion-sys-0.1.1/Cargo.lock0000644000000261001046102023000120420ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "aho-corasick" version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] [[package]] name = "apr" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93e5afaf2a65c6af5fbb4637fdf1c620a603dfd189368461ded09f4f6a5cd5a8" dependencies = [ "apr-sys", "ctor", ] [[package]] name = "apr-sys" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edccb3d92ae38dd713e46ea192cf3a2fb3ffa387817691816cef9a3b5ebb8b7c" dependencies = [ "bindgen", "system-deps", ] [[package]] name = "bindgen" version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ "bitflags", "cexpr", "clang-sys", "itertools", "log", "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", "syn", ] [[package]] name = "bitflags" version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" [[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.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c6b04e07d8080154ed4ac03546d9a2b303cc2fe1901ba0b35b301516e289368" dependencies = [ "smallvec", "target-lexicon", ] [[package]] name = "cfg-if" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[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 = "ctor" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "424e0138278faeb2b401f174ad17e715c829512d74f3d1e81eb43365c2e0590e" dependencies = [ "ctor-proc-macro", "dtor", ] [[package]] name = "ctor-proc-macro" version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" [[package]] name = "dtor" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "404d02eeb088a82cfd873006cb713fe411306c7d182c344905e101fb1167d301" dependencies = [ "dtor-proc-macro", ] [[package]] name = "dtor-proc-macro" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" [[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.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" 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.183" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "libloading" version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if", "windows-link", ] [[package]] name = "log" version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "memchr" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[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.106" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] [[package]] name = "regex" version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rustc-hash" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "serde_core" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_spanned" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" dependencies = [ "serde_core", ] [[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 = "subversion-sys" version = "0.1.1" dependencies = [ "apr", "apr-sys", "bindgen", "system-deps", ] [[package]] name = "syn" version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "system-deps" version = "7.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c8f33736f986f16d69b6cb8b03f55ddcad5c41acc4ccc39dd88e84aa805e7f" dependencies = [ "cfg-expr", "heck", "pkg-config", "toml", "version-compare", ] [[package]] name = "target-lexicon" version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" [[package]] name = "toml" version = "0.9.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" dependencies = [ "indexmap", "serde_core", "serde_spanned", "toml_datetime", "toml_parser", "toml_writer", "winnow", ] [[package]] name = "toml_datetime" version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" version = "1.0.9+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" dependencies = [ "winnow", ] [[package]] name = "toml_writer" version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" [[package]] name = "unicode-ident" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "version-compare" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "winnow" version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" subversion-sys-0.1.1/Cargo.toml0000644000000033521046102023000120710ustar # 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 = "subversion-sys" version = "0.1.1" authors = ["Jelmer Vernooij "] build = "build.rs" autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "Low-level FFI bindings for Subversion" homepage = "https://github.com/jelmer/subversion-rs" documentation = "https://docs.rs/subversion-sys" readme = false license = "Apache-2.0" repository = "https://github.com/jelmer/subversion-rs.git" [package.metadata.system-deps] libsvn_diff = ">=1.14" libsvn_subr = ">=1.14" libsvn_repos = ">=1.14" libsvn_fs = ">=1.14" [package.metadata.system-deps.libsvn_client] version = ">=1.14" feature = "client" [package.metadata.system-deps.libsvn_delta] version = ">=1.14" feature = "delta" [package.metadata.system-deps.libsvn_wc] version = ">=1.14" feature = "wc" [package.metadata.system-deps.libsvn_ra] version = ">=1.14" feature = "ra" [features] client = [] default = [ "ra", "wc", "client", "delta", ] delta = [] ra = ["delta"] wc = ["delta"] [lib] name = "subversion_sys" path = "src/lib.rs" doctest = false [dependencies.apr] version = ">=0.1.14, <0.5" [dependencies.apr-sys] version = "0.2.1" [build-dependencies.bindgen] version = "0.72" [build-dependencies.system-deps] version = "7.0" subversion-sys-0.1.1/Cargo.toml.orig000064400000000000000000000016761046102023000155370ustar 00000000000000[package] name = "subversion-sys" version = "0.1.1" edition = "2021" authors = ["Jelmer Vernooij "] repository = "https://github.com/jelmer/subversion-rs.git" homepage = "https://github.com/jelmer/subversion-rs" license = "Apache-2.0" description = "Low-level FFI bindings for Subversion" documentation = "https://docs.rs/subversion-sys" [lib] doctest = false [dependencies] apr = { version = ">=0.1.14, <0.5" } apr-sys = "0.2.1" [build-dependencies] bindgen = "0.72" system-deps = "7.0" [features] default = ["ra", "wc", "client", "delta"] client = [] ra = ["delta"] wc = ["delta"] delta = [] [package.metadata.system-deps] libsvn_client = { version = ">=1.14", feature = "client" } libsvn_delta = { version = ">=1.14", feature = "delta" } libsvn_diff = ">=1.14" libsvn_subr = ">=1.14" libsvn_repos = ">=1.14" libsvn_fs = ">=1.14" libsvn_wc = { version = ">=1.14", feature = "wc" } libsvn_ra = { version = ">=1.14", feature = "ra" } subversion-sys-0.1.1/build.rs000064400000000000000000000117461046102023000143140ustar 00000000000000extern crate bindgen; fn create_svn_bindings( svn_path: &std::path::Path, out_path: &std::path::Path, include_paths: &[&std::path::Path], ) { let client_feature_enabled = std::env::var("CARGO_FEATURE_CLIENT").is_ok(); let delta_feature_enabled = std::env::var("CARGO_FEATURE_DELTA").is_ok(); let ra_feature_enabled = std::env::var("CARGO_FEATURE_RA").is_ok(); let wc_feature_enabled = std::env::var("CARGO_FEATURE_WC").is_ok(); let mut builder = bindgen::Builder::default() .header(svn_path.join("svn_dirent_uri.h").to_str().unwrap()) .header(svn_path.join("svn_dso.h").to_str().unwrap()) .header(svn_path.join("svn_path.h").to_str().unwrap()) .header(svn_path.join("svn_version.h").to_str().unwrap()) .header(svn_path.join("svn_error.h").to_str().unwrap()) .header(svn_path.join("svn_error_codes.h").to_str().unwrap()) .header(svn_path.join("svn_opt.h").to_str().unwrap()) .header(svn_path.join("svn_repos.h").to_str().unwrap()) .header(svn_path.join("svn_time.h").to_str().unwrap()) .header(svn_path.join("svn_types.h").to_str().unwrap()) .header(svn_path.join("svn_types_impl.h").to_str().unwrap()) .header(svn_path.join("svn_props.h").to_str().unwrap()) .header(svn_path.join("svn_fs.h").to_str().unwrap()) .header(svn_path.join("svn_auth.h").to_str().unwrap()) .header(svn_path.join("svn_config.h").to_str().unwrap()) .header(svn_path.join("svn_mergeinfo.h").to_str().unwrap()) .header(svn_path.join("svn_io.h").to_str().unwrap()) .header(svn_path.join("svn_hash.h").to_str().unwrap()) .header(svn_path.join("svn_iter.h").to_str().unwrap()) .header(svn_path.join("svn_subst.h").to_str().unwrap()) .header(svn_path.join("svn_utf.h").to_str().unwrap()) .header(svn_path.join("svn_diff.h").to_str().unwrap()) .header(svn_path.join("svn_cmdline.h").to_str().unwrap()) .header(svn_path.join("svn_nls.h").to_str().unwrap()) .header(svn_path.join("svn_x509.h").to_str().unwrap()) .header(svn_path.join("svn_base64.h").to_str().unwrap()) .header(svn_path.join("svn_cache_config.h").to_str().unwrap()) .allowlist_file(".*/svn_.*.h") .blocklist_type("apr_.*") .derive_default(true) .raw_line("use apr_sys::apr_file_t;") .raw_line("use apr_sys::apr_finfo_t;") .raw_line("use apr_sys::apr_getopt_t;") .raw_line("use apr_sys::apr_int64_t;") .raw_line("use apr_sys::apr_off_t;") .raw_line("use apr_sys::apr_pool_t;") .raw_line("use apr_sys::apr_size_t;") .raw_line("use apr_sys::apr_ssize_t;") .raw_line("use apr_sys::apr_status_t;") .raw_line("use apr_sys::apr_time_t;") .raw_line("use apr_sys::apr_int32_t;") .raw_line("use apr_sys::apr_uint32_t;") .raw_line("use apr_sys::apr_fileperms_t;") .raw_line("use apr_sys::apr_proc_t;") .raw_line("use apr_sys::apr_uint64_t;") .raw_line("use apr_sys::apr_dir_t;") .raw_line("use apr::hash::apr_hash_t;") .raw_line("use apr::tables::apr_array_header_t;") .raw_line("use apr_sys::apr_getopt_option_t;") .raw_line("use apr_sys::apr_exit_why_e;") .raw_line("use apr_sys::apr_seek_where_t;") .raw_line("#[allow(unused_imports)]") .raw_line("use apr_sys::apr_byte_t;") .raw_line("use apr_sys::apr_dso_handle_t;") .clang_args( include_paths .iter() .map(|path| format!("-I{}", path.display())), ); if client_feature_enabled { builder = builder.header(svn_path.join("svn_client.h").to_str().unwrap()); } if wc_feature_enabled { builder = builder.header(svn_path.join("svn_wc.h").to_str().unwrap()); } // Include svn_ra.h if ra feature OR client feature is enabled // (client library depends on ra) if ra_feature_enabled || client_feature_enabled { builder = builder.header(svn_path.join("svn_ra.h").to_str().unwrap()); } if delta_feature_enabled { builder = builder.header(svn_path.join("svn_delta.h").to_str().unwrap()); } // Generate bindings using bindgen let svn_bindings = builder.generate().expect("Failed to generate bindings"); svn_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 svn = deps.get_by_name("libsvn_subr").unwrap(); let svn_path = svn .include_paths .iter() .find(|x| x.join("svn_config.h").exists()) .expect("Failed to find svn_config.h"); let out_path = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap()); create_svn_bindings( svn_path.as_path(), out_path.as_path(), svn.include_paths .iter() .map(|x| x.as_path()) .collect::>() .as_slice(), ); } subversion-sys-0.1.1/src/lib.rs000064400000000000000000000006031046102023000145400ustar 00000000000000#![allow(bad_style)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(dead_code)] #![allow(clippy::upper_case_acronyms)] #![allow(unnecessary_transmutes)] #![allow(clippy::missing_safety_doc)] #![allow(clippy::ptr_offset_with_cast)] #![allow(clippy::type_complexity)] pub use apr; include!(concat!(env!("OUT_DIR"), "/bindings.rs"));