nix-expr: Improve docs

... and fix an error message

(cherry picked from commit ec3b5cfb911545ecf756336e792b59c5dd1be9b5)
This commit is contained in:
Robert Hensing 2025-09-30 15:50:42 +02:00
parent e68ec02d05
commit 65c9d937cd
3 changed files with 514 additions and 51 deletions

View file

@ -1,5 +1,22 @@
//! 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-store` and `nix-expr`.
// Standard bindgen suppressions for C naming conventions
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
// 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
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));