tvl-depot/users/picnoir/tvix-daemon
Florian Klink e03ea11bad feat(nix-compat/nix_http): init parse_nar[info]_str
This moves the URL component parsing code we had in nar-bridge to
nix-compat.

We change the function signature to return an Option, not a
Result<_, StatusCode>.

This allows returning more appropriate error codes, as we can
ok_or(…) at the callsite, which we now do: on an upload to an
invalid path, we now return "unauthorized", while on a GET/HEAD, we
return "not found".

This also adds support to parse compression suffixes. While not
supported in nar-bridge, other users of nix-compat might very well want
to parse these paths.

Also fix the error message when parsing NAR urls, it mentioned 32, not
52, which is a copypasta error from the narinfo URL parsing code.

Change-Id: Id1be9a8044814b54ce68b125c52dfe933c9c4f74
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12260
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-21 09:40:32 +00:00
..
src refactor(nix-compat/wire): drop primitive functions 2024-04-30 09:55:51 +00:00
vm-test feat(users/picnoir/tvix-daemon) add small VM integration test 2024-03-19 16:51:58 +00:00
.gitignore fix(users/picnoir/tvix-daemon): gitignore target dir, use cleaned src 2024-04-23 15:14:42 +00:00
Cargo.lock feat(nix-compat/nix_http): init parse_nar[info]_str 2024-08-21 09:40:32 +00:00
Cargo.nix feat(nix-compat/nix_http): init parse_nar[info]_str 2024-08-21 09:40:32 +00:00
Cargo.toml refactor(tvix/nix-compat): reorganize wire and bytes 2024-04-13 10:09:35 +00:00
default.nix fix(users/picnoir/tvix-daemon): gitignore target dir, use cleaned src 2024-04-23 15:14:42 +00:00
README.md docs(users/picnoir/tvix-daemon): update readme shell 2024-03-22 05:58:49 +00:00
shell.nix feat(users/picnoir/tvix-daemon): introduce tvix-daemon 2024-03-19 16:51:43 +00:00

Tvix-daemon

A super incomplete implementation of a Nix-compatible daemon. Same as the original except it's backed by Tvix-Store.

For now, this is mostly used as a playground to implement the Nix daemon wire format in nix-compat.

On the long run, I hope this to be useful to get some real-world usage experience of tvix-store.

Build

When inside this directory:

mg shell :shell
cargo build