about summary refs log tree commit diff
path: root/users/picnoir/tvix-daemon/src/main.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-04-07 r/7868 feat(users/picnoir/tvix-daemon): implement set_options operationPicnoir1-9/+52
The protocol is more stateful than I initially thought. We need to keep track to a bunch of things, including but not limited to: the client settings, the client version. I moved things around a bit to keep this state along with the client socket. Change-Id: Ibd34fbe7821c20a460934ea1af0719f5de46e491 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11359 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-04-03 r/7849 chore(users/picnoir/tvix-daemon): apply clippy suggestionsPicnoir1-3/+3
Remove potential partial reads/writes and instead read/write the full buffer size: we want those to be 64 bits. Change-Id: I1f767baf23fa80c2babb8113f61d1a9e72a8d8dd Reviewed-on: https://cl.tvl.fyi/c/depot/+/11350 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-04-03 r/7847 feat(users/picnoir/tvix-daemon): add log verbosity flagPicnoir1-3/+12
Adding a verbosity flag available through the CLI/ENV variable. Change-Id: If04cc2e6e26e7cb3c2df7821fce222da2b85a95a Reviewed-on: https://cl.tvl.fyi/c/depot/+/11349 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-04-03 r/7846 refactor(tvix/nix-compat): drop read_u32Picnoir1-2/+2
Actually these are all u64 LE encoded on the wire. Change-Id: I5ca22c7639607ac47117cd946e036a444271885a Reviewed-on: https://cl.tvl.fyi/c/depot/+/11348 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-04-03 r/7845 feat(users/picnoir/tvix-daemon): parse up to the operationPicnoir1-11/+32
Using all the primitives recently implemented to nix-compat to reach the point where the Nix client start to send us operation requests. Using a small integration test script (or the VM test, but let's face it, it's too slow to be useful), we manage to reach the point where we're able to read a store operation: 2024-03-21T18:53:27.624876Z INFO tvix_daemon: Incoming connection addr=unix 2024-03-21T18:53:27.625312Z INFO worker:perform_init_handshake: tvix_daemon: Trust sent conn=Connection(unix) conn=Connection(unix) 2024-03-21T18:53:27.625406Z INFO worker: tvix_daemon: Client hanshake succeeded conn=Connection(unix) 2024-03-21T18:53:27.625488Z INFO worker: tvix_daemon: Operation received op=SetOptions conn=Connection(unix) We had to take some shortcuts wrt. stderr/log management. The CPP Nix codebase is a bit confusing in that area. I'll need to spend more time reading this to fully understand what's happening there. For now, sending the STDERR_LAST command to the client does the trick. Change-Id: I9b0e20a52d885e64fe29188496aac5334de61edd Reviewed-on: https://cl.tvl.fyi/c/depot/+/11233 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-03-25 r/7781 feat(users/picnoir/tvix-daemon): implement full handshakePicnoir1-2/+58
Implementing the full connection handshake. The integration test is a bit naive, but there's not much to test yet. Tested this against cpp nix. We reach the stage where cppnix sends the opcode. Change-Id: I98322832848ee5b048f22105731b0adeb44b2ce0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11227 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-03-19 r/7742 feat(users/picnoir/tvix-daemon): introduce tvix-daemonPicnoir1-0/+89
This daemon is a re-implementation of the Nix daemon except it uses tvix-store as a remote store. For now, it's very barebones, this is just a quick and dirty setup to get started with the project. We bind to the unix socket provided by systemd, wait for cpp Nix to send the magic hello bytes, respond with the magic hello bytes and call it a day. Storing this under my username for now, the project is mostly irrelevant as it is. We'll move it to Tvix if it gets complete and relevant at some point. Change-Id: Ifc5dce2df37413504f9de1942c5b7d425eddf759 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11198 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI