Rename nix-bindings-bindgen-raw to nix-bindings-util-sys

Adopt idiomatic Rust `-sys` crate naming convention, aligning with
the direction in PR #37 without adopting the full crate splitting.
This commit is contained in:
Robert Hensing 2026-01-12 19:56:04 +01:00
parent 795dfddc04
commit e6148b587f
25 changed files with 78 additions and 87 deletions

View file

@ -1,9 +1,9 @@
use anyhow::{bail, Result};
use nix_bindings_bindgen_raw as raw;
use nix_bindings_util_sys as raw;
use std::ptr::null_mut;
use std::ptr::NonNull;
/// A context for error handling, when interacting directly with the generated bindings for the C API in [nix_bindings_bindgen_raw].
/// A context for error handling, when interacting directly with the generated bindings for the C API in [nix_bindings_util_sys].
///
/// The `nix-store` and `nix-expr` libraries that consume this type internally store a private context in their `EvalState` and `Store` structs to avoid allocating a new context for each operation. The state of a context is irrelevant when used correctly (e.g. with [check_call!]), so it's safe to reuse, and safe to allocate more contexts in methods such as [Clone::clone].
pub struct Context {

View file

@ -1,5 +1,5 @@
use anyhow::Result;
use nix_bindings_bindgen_raw as raw;
use nix_bindings_util_sys as raw;
use std::sync::Mutex;
use crate::{

View file

@ -52,9 +52,9 @@ macro_rules! result_string_init {
#[cfg(test)]
mod tests {
use super::*;
use nix_bindings_bindgen_raw as raw;
use nix_bindings_util_sys as raw;
/// Typecheck the function signature against the generated bindings in nix_bindings_bindgen_raw.
/// Typecheck the function signature against the generated bindings in nix_bindings_util_sys.
static _CALLBACK_GET_RESULT_STRING: raw::get_string_callback = Some(callback_get_result_string);
#[test]