nt_hive/
lib.rs

1// Copyright 2019-2025 Colin Finck <colin@reactos.org>
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4//! # nt-hive
5//! The *nt-hive* Rust crate provides a comfortable and safe interface for accessing keys, values, and data stored in *hive* files.
6//! Hive files can be found in `C:\Windows\system32\config` and store what is commonly called the *Windows registry*.
7//! This crate supports the hive format that is used from Windows NT 4.0 up to the current Windows 10.
8//!
9//! # Getting started
10//! 1. Create a [`Hive`] structure from hive data by calling [`Hive::new`].
11//! 2. Retrieve the root [`KeyNode`] via [`Hive::root_key_node`].
12//! 3. Move to a subkey via [`KeyNode::subkey`], [`KeyNode::subkeys`] or [`KeyNode::subpath`].
13//! 4. Get an interesting value using [`KeyNode::value`] or [`KeyNode::values`].
14
15#![cfg_attr(not(feature = "std"), no_std)]
16#![doc(html_logo_url = "https://colinfinck.de/img/software/nt-hive.svg")]
17#![forbid(unsafe_code)]
18
19#[macro_use]
20mod helpers;
21
22mod big_data;
23mod error;
24mod hive;
25mod index_root;
26mod key_node;
27mod key_value;
28mod key_values_list;
29mod leaf;
30mod string;
31mod subkeys_list;
32
33pub use crate::big_data::*;
34pub use crate::error::*;
35pub use crate::hive::*;
36pub use crate::index_root::*;
37pub use crate::key_node::*;
38pub use crate::key_value::*;
39pub use crate::key_values_list::*;
40pub use crate::leaf::*;
41pub use crate::string::*;
42pub use crate::subkeys_list::*;
43
44#[cfg(feature = "alloc")]
45extern crate alloc;