snix/tvix/nix-compat/src/nar
Ryan Lahfa a4e40d1dfa feat(tvix/nix-compat): entry locator in listing structures
This implements a simple DFS locator in listing structures.

It is interoperable with the Rust standard library paths, we also build our
own errors to restrict path values to reasonable secure defaults, e.g.
relative paths with no `..` component.

Tests are added for this new feature for a positive and a negative
check.

In addition, a path validation test was added. The Windows-style prefix
is gated on the Windows platform as UNIX does not parse `C:\\` as a
`Component::Prefix(_)` but as a `Component::Normal(_)`.

Change-Id: Iae2a80bebd8138e41af94aa7d09f2842c3c5a786
Signed-off-by: Ryan Lahfa <tvl@lahfa.xyz>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12255
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-19 22:32:09 +00:00
..
listing feat(tvix/nix-compat): entry locator in listing structures 2024-08-19 22:32:09 +00:00
reader fix(tvix/nix-compat): async nar reader requires wire feature 2024-05-26 19:52:49 +00:00
tests feat(tvix/nix-compat): add a basic listing deserializer 2024-08-19 19:18:42 +00:00
wire test(tvix/nix-compat/nar/wire): cover TOK_PAD_PAR 2024-08-09 15:28:46 +00:00
writer refactor(tvix/nix-compat): move nar writer to tokio 2024-04-13 10:09:35 +00:00
mod.rs feat(tvix/nix-compat): add a basic listing deserializer 2024-08-19 19:18:42 +00:00