2026-01-14 15:19:47 -05:00
|
|
|
//! Raw bindings to Nix C API
|
|
|
|
|
//!
|
|
|
|
|
//! This crate contains automatically generated bindings from the Nix C headers.
|
|
|
|
|
//! The bindings are generated by bindgen and include C-style naming conventions
|
|
|
|
|
//! and documentation comments that don't always conform to Rust standards.
|
|
|
|
|
//!
|
|
|
|
|
//! Normally you don't have to use this crate directly.
|
|
|
|
|
//! Instead use `nix-expr`.
|
|
|
|
|
|
|
|
|
|
// This file must only contain generated code, so that the module-level
|
|
|
|
|
// #![allow(...)] attributes don't suppress warnings in hand-written code.
|
|
|
|
|
// If you need to add hand-written code, use a submodule to isolate the
|
|
|
|
|
// generated code. See:
|
|
|
|
|
// https://github.com/nixops4/nixops4/pull/138/commits/330c3881be3d3cf3e59adebbe0ab1c0f15f6d2c9
|
|
|
|
|
|
|
|
|
|
// Standard bindgen suppressions for C naming conventions
|
2025-12-06 15:44:20 -05:00
|
|
|
#![allow(non_upper_case_globals)]
|
|
|
|
|
#![allow(non_camel_case_types)]
|
|
|
|
|
#![allow(non_snake_case)]
|
2026-01-14 15:19:47 -05:00
|
|
|
// Clippy suppressions for generated C bindings
|
|
|
|
|
// bindgen doesn't generate safety docs
|
|
|
|
|
#![allow(clippy::missing_safety_doc)]
|
|
|
|
|
// Rustdoc suppressions for generated C documentation
|
|
|
|
|
// The C headers contain Doxygen-style documentation that doesn't translate
|
|
|
|
|
// well to Rust's rustdoc format, causing various warnings:
|
|
|
|
|
#![allow(rustdoc::broken_intra_doc_links)] // @param[in]/[out] references don't resolve
|
|
|
|
|
#![allow(rustdoc::bare_urls)] // C docs may contain unescaped URLs
|
|
|
|
|
#![allow(rustdoc::invalid_html_tags)] // Doxygen HTML tags like <setting>
|
|
|
|
|
#![allow(rustdoc::invalid_codeblock_attributes)] // C code examples may use unsupported attributes
|
2025-12-06 15:44:20 -05:00
|
|
|
|
|
|
|
|
use nix_bindings_store_sys::*;
|
|
|
|
|
use nix_bindings_util_sys::*;
|
|
|
|
|
|
|
|
|
|
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|