Expand description
Fast, high-level access to Nix flake lock files.
The crate parses directly into a compact indexed graph. It does not build a generic JSON tree and does not require Nix or its C++ libraries at runtime. Unescaped strings borrow from the input buffer, while canonical serialization writes directly to a caller-provided byte vector.
The 0.1 API intentionally exposes a read-only graph. Use
LockFile::into_owned to detach a parsed graph from its input lifetime;
this does not make the graph mutable.
§Example
use nix_flake_lock::LockFile;
let lock = LockFile::parse(bytes)?;
lock.validate()?;
let canonical = lock.to_nix_bytes();
assert_eq!(LockFile::parse(&canonical)?, lock);Structs§
- Attr
- One name-value pair from a fetcher attribute set.
- AttrSet
- A sorted flat fetcher attribute map.
- Error
- A parse error carrying a byte offset into the input document.
- Input
- A named outgoing edge from a node.
- Input
Path - A path of input names, used by
followsedges and graph lookup. - Limits
- Resource limits applied while parsing untrusted lock files.
- Lock
File - A parsed Nix flake lock file.
- Locked
Node - The lock metadata associated with a non-root node.
- Node
- A node in the compact lock-file graph.
- NodeId
- An index into a lock file’s compact node arena.
Enums§
- Attr
Value - A fetcher attribute value. Nix restricts these values to this flat set.
- Change
- One semantic change between two lock-file input graphs.
- Edge
- An outgoing edge from a lock-file node.
- Edge
Value - The semantic value attached to a changed input edge.
- Error
Kind - The category and associated context of a parse failure.
- Node
Kind - The root or locked-node-specific portion of a node.
- Resolve
Error - An error encountered while resolving an input path.
- Validation
Error - A graph-integrity error found by
LockFile::validate.
Type Aliases§
- Owned
Lock File - An owned lock file that does not borrow its input buffer.