feat(tvix/serde): initial Nix->serde::Deserialize impl

This will make it possible fairly easily use Nix to represent
arbitrary data structures, e.g. for using Nix as a config language.

Only pure Nix (i.e. no `import` etc.) is supported for now.

Not all types, specifically no struct traversal, are implemented in
this commit.

Change-Id: I9ac91a229a0d12bf818e6e3249f3e5a691599a2c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7712
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Vincent Ambo 2022-12-31 18:13:59 +03:00 committed by tazjin
parent 49ee3e3b14
commit 90c32eec7a
8 changed files with 485 additions and 0 deletions

8
tvix/Cargo.lock generated
View file

@ -2214,6 +2214,14 @@ dependencies = [
name = "tvix-nar"
version = "0.0.0"
[[package]]
name = "tvix-serde"
version = "0.1.0"
dependencies = [
"serde",
"tvix-eval",
]
[[package]]
name = "tvix-store"
version = "0.1.0"