tvl-depot/tvix/nix-compat
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
..
benches feat(tvix): Jemalloc -> MiMalloc 2024-08-08 08:06:23 +00:00
src feat(tvix/nix-compat): entry locator in listing structures 2024-08-19 22:32:09 +00:00
testdata feat(nix-compat/nixcpp): init nix.conf config parsing 2024-06-28 12:23:03 +00:00
build.rs fix(tvix): make rstest pick up new test case files 2024-06-05 17:52:17 +00:00
Cargo.toml feat(nix-compat/narinfo/signature): generalize name field 2024-08-19 19:46:34 +00:00
default.nix chore(tvix): Retain original passthru in Rust builds 2024-08-15 23:37:00 +00:00