feat(tvix/store): add write_nar function
This adds a function that consumes a [proto::node::Node] pointing to the root of a (store) path, and writes the contents in NAR serialization to the passed [std::io::Write]. We need this in various places: - tvix-store's calculate_nar() RPC method needs to render a NAR stream to get the nar hash, which is necessary to give things imported in the store a "NAR-based" store path. - communication with (remote) Nix (via daemon protocol) needs a NAR representation. - Things like nar-bridge, exposing a NAR/NARInfo HTTP interface need a NAR representation. Change-Id: I7fb2e0bf01814a1c09094c0e35394d9d6b3e43b6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7956 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
a23b7e17c0
commit
0db73cb2bd
6 changed files with 351 additions and 22 deletions
|
|
@ -1,8 +1,11 @@
|
|||
pub mod client;
|
||||
pub mod proto;
|
||||
|
||||
pub mod dummy_blob_service;
|
||||
pub mod sled_directory_service;
|
||||
pub mod sled_path_info_service;
|
||||
|
||||
mod nar;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue