feat(nix-daemon): Implement client handler.

This change includes only the basic nix handshake protocol handling and
sets up a client session. The only supported operation at this point is
SetOptions.

Additional operations will be implemented in subsequent cls.

Change-Id: I3eccd9e0ceb270c3865929543c702f1491768852
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12743
Autosubmit: Vladimir Kryachko <v.kryachko@gmail.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Reviewed-by: Brian Olsen <me@griff.name>
This commit is contained in:
Vova Kryachko 2024-11-08 10:44:27 -05:00 committed by Vladimir Kryachko
parent 72bc4e0270
commit b564ed9d43
25 changed files with 1822 additions and 253 deletions

View file

@ -4372,7 +4372,7 @@ rec {
];
features = { };
};
"hashbrown" = rec {
"hashbrown 0.14.3" = rec {
crateName = "hashbrown";
version = "0.14.3";
edition = "2021";
@ -4420,7 +4420,29 @@ rec {
"rustc-dep-of-std" = [ "nightly" "core" "compiler_builtins" "alloc" "rustc-internal-api" ];
"serde" = [ "dep:serde" ];
};
resolvedDefaultFeatures = [ "ahash" "allocator-api2" "default" "inline-more" "raw" "rayon" ];
resolvedDefaultFeatures = [ "ahash" "allocator-api2" "default" "inline-more" "rayon" ];
};
"hashbrown 0.15.1" = rec {
crateName = "hashbrown";
version = "0.15.1";
edition = "2021";
sha256 = "1czsvasi3azv2079fcvbhvpisa16w6fi1mfk8zm2c5wbyqdgr6rs";
authors = [
"Amanieu d'Antras <amanieu@gmail.com>"
];
features = {
"alloc" = [ "dep:alloc" ];
"allocator-api2" = [ "dep:allocator-api2" ];
"compiler_builtins" = [ "dep:compiler_builtins" ];
"core" = [ "dep:core" ];
"default" = [ "default-hasher" "inline-more" "allocator-api2" "equivalent" "raw-entry" ];
"default-hasher" = [ "dep:foldhash" ];
"equivalent" = [ "dep:equivalent" ];
"nightly" = [ "allocator-api2?/nightly" "bumpalo/allocator_api" ];
"rayon" = [ "dep:rayon" ];
"rustc-dep-of-std" = [ "nightly" "core" "compiler_builtins" "alloc" "rustc-internal-api" "raw-entry" ];
"serde" = [ "dep:serde" ];
};
};
"heck" = rec {
crateName = "heck";
@ -4898,9 +4920,9 @@ rec {
};
"indexmap" = rec {
crateName = "indexmap";
version = "2.2.3";
version = "2.6.0";
edition = "2021";
sha256 = "0xy1wcad2da199f6y0mwmx9scw7glgs1n2g4m8nfln7hcf8g6g13";
sha256 = "1nmrwn8lbs19gkvhxaawffzbvrpyrb5y3drcrr645x957kz0fybh";
dependencies = [
{
name = "equivalent";
@ -4909,13 +4931,13 @@ rec {
}
{
name = "hashbrown";
packageId = "hashbrown";
packageId = "hashbrown 0.15.1";
usesDefaultFeatures = false;
features = [ "raw" ];
}
];
features = {
"arbitrary" = [ "dep:arbitrary" ];
"borsh" = [ "dep:borsh" ];
"default" = [ "std" ];
"quickcheck" = [ "dep:quickcheck" ];
"rayon" = [ "dep:rayon" ];
@ -5521,6 +5543,10 @@ rec {
name = "num-traits";
packageId = "num-traits";
}
{
name = "num_enum";
packageId = "num_enum";
}
{
name = "pin-project-lite";
packageId = "pin-project-lite";
@ -5547,7 +5573,7 @@ rec {
name = "tokio";
packageId = "tokio";
optional = true;
features = [ "io-util" "macros" ];
features = [ "io-util" "macros" "sync" ];
}
{
name = "tracing";
@ -5567,13 +5593,14 @@ rec {
features = {
"async" = [ "tokio" ];
"bytes" = [ "dep:bytes" ];
"default" = [ "async" "wire" "nix-compat-derive" ];
"daemon" = [ "tokio" "nix-compat-derive" ];
"default" = [ "async" "daemon" "wire" "nix-compat-derive" ];
"nix-compat-derive" = [ "dep:nix-compat-derive" ];
"pin-project-lite" = [ "dep:pin-project-lite" ];
"tokio" = [ "dep:tokio" ];
"wire" = [ "tokio" "pin-project-lite" "bytes" ];
};
resolvedDefaultFeatures = [ "async" "bytes" "default" "nix-compat-derive" "pin-project-lite" "tokio" "wire" ];
resolvedDefaultFeatures = [ "async" "bytes" "daemon" "default" "nix-compat-derive" "pin-project-lite" "tokio" "wire" ];
};
"nix-compat-derive" = rec {
crateName = "nix-compat-derive";
@ -5728,6 +5755,76 @@ rec {
};
resolvedDefaultFeatures = [ "default" "i128" "libm" "std" ];
};
"num_enum" = rec {
crateName = "num_enum";
version = "0.7.3";
edition = "2021";
sha256 = "0yai0vafhy85mvhknzfqd7lm04hzaln7i5c599rhy8mj831kyqaf";
authors = [
"Daniel Wagner-Hall <dawagner@gmail.com>"
"Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>"
"Vincent Esche <regexident@gmail.com>"
];
dependencies = [
{
name = "num_enum_derive";
packageId = "num_enum_derive";
usesDefaultFeatures = false;
}
];
features = {
"complex-expressions" = [ "num_enum_derive/complex-expressions" ];
"default" = [ "std" ];
"std" = [ "num_enum_derive/std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"num_enum_derive" = rec {
crateName = "num_enum_derive";
version = "0.7.3";
edition = "2021";
sha256 = "0mksna1jj87ydh146gn6jcqkvvs920c3dgh0p4f3xk184kpl865g";
procMacro = true;
authors = [
"Daniel Wagner-Hall <dawagner@gmail.com>"
"Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>"
"Vincent Esche <regexident@gmail.com>"
];
dependencies = [
{
name = "proc-macro-crate";
packageId = "proc-macro-crate";
optional = true;
}
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn 2.0.79";
features = [ "parsing" ];
}
];
devDependencies = [
{
name = "syn";
packageId = "syn 2.0.79";
features = [ "extra-traits" "parsing" ];
}
];
features = {
"complex-expressions" = [ "syn/full" ];
"default" = [ "std" ];
"proc-macro-crate" = [ "dep:proc-macro-crate" ];
"std" = [ "proc-macro-crate" ];
};
resolvedDefaultFeatures = [ "proc-macro-crate" "std" ];
};
"number_prefix" = rec {
crateName = "number_prefix";
version = "0.4.0";
@ -6387,7 +6484,7 @@ rec {
}
{
name = "hashbrown";
packageId = "hashbrown";
packageId = "hashbrown 0.14.3";
features = [ "rayon" "ahash" ];
}
{
@ -6576,7 +6673,7 @@ rec {
}
{
name = "hashbrown";
packageId = "hashbrown";
packageId = "hashbrown 0.14.3";
features = [ "rayon" "ahash" ];
}
{
@ -7155,7 +7252,7 @@ rec {
}
{
name = "hashbrown";
packageId = "hashbrown";
packageId = "hashbrown 0.14.3";
features = [ "rayon" "ahash" ];
}
{
@ -7421,7 +7518,7 @@ rec {
}
{
name = "hashbrown";
packageId = "hashbrown";
packageId = "hashbrown 0.14.3";
features = [ "rayon" "ahash" ];
}
{
@ -7895,7 +7992,7 @@ rec {
}
{
name = "hashbrown";
packageId = "hashbrown";
packageId = "hashbrown 0.14.3";
features = [ "rayon" "ahash" ];
}
{
@ -7983,6 +8080,23 @@ rec {
};
resolvedDefaultFeatures = [ "simd" "std" ];
};
"proc-macro-crate" = rec {
crateName = "proc-macro-crate";
version = "3.2.0";
edition = "2021";
sha256 = "0yzsqnavb3lmrcsmbrdjfrky9vcbl46v59xi9avn0796rb3likwf";
libName = "proc_macro_crate";
authors = [
"Bastian Köcher <git@kchr.de>"
];
dependencies = [
{
name = "toml_edit";
packageId = "toml_edit";
}
];
};
"proc-macro2" = rec {
crateName = "proc-macro2";
version = "1.0.88";
@ -10009,6 +10123,51 @@ rec {
};
resolvedDefaultFeatures = [ "codec" "default" "io" "io-util" "tracing" ];
};
"toml_datetime" = rec {
crateName = "toml_datetime";
version = "0.6.8";
edition = "2021";
sha256 = "0hgv7v9g35d7y9r2afic58jvlwnf73vgd1mz2k8gihlgrf73bmqd";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
features = {
"serde" = [ "dep:serde" ];
};
};
"toml_edit" = rec {
crateName = "toml_edit";
version = "0.22.22";
edition = "2021";
sha256 = "1xf7sxfzmnc45f75x302qrn5aph52vc8w226v59yhrm211i8vr2a";
authors = [
"Andronik Ordian <write@reusable.software>"
"Ed Page <eopage@gmail.com>"
];
dependencies = [
{
name = "indexmap";
packageId = "indexmap";
features = [ "std" ];
}
{
name = "toml_datetime";
packageId = "toml_datetime";
}
{
name = "winnow";
packageId = "winnow";
optional = true;
}
];
features = {
"default" = [ "parse" "display" ];
"parse" = [ "dep:winnow" ];
"perf" = [ "dep:kstring" ];
"serde" = [ "dep:serde" "toml_datetime/serde" "dep:serde_spanned" ];
};
resolvedDefaultFeatures = [ "default" "display" "parse" ];
};
"tower-service" = rec {
crateName = "tower-service";
version = "0.3.2";
@ -11726,6 +11885,28 @@ rec {
];
};
"winnow" = rec {
crateName = "winnow";
version = "0.6.20";
edition = "2021";
sha256 = "16y4i8z9vh8hazjxg5mvmq0c5i35wlk8rxi5gkq6cn5vlb0zxh9n";
dependencies = [
{
name = "memchr";
packageId = "memchr";
optional = true;
usesDefaultFeatures = false;
}
];
features = {
"debug" = [ "std" "dep:anstream" "dep:anstyle" "dep:is-terminal" "dep:terminal_size" ];
"default" = [ "std" ];
"simd" = [ "dep:memchr" ];
"std" = [ "alloc" "memchr?/std" ];
"unstable-doc" = [ "alloc" "std" "simd" "unstable-recover" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
};
"xmlparser" = rec {
crateName = "xmlparser";
version = "0.13.6";