tvl-depot/tvix/eval
Vincent Ambo 08b4d65fbd feat(tvix/value): implement nested attribute set literals
With this change, nested attribute sets can now be created from
literals.

This required some logic for dealing with cases where at a deeper
nesting point a literal attribute set was constructed from an
optimised representation.

For example, this is valid Nix code:

```nix
{
  a = {};   # creates optimised empty representation
  a.b = 1;  # wants to add a `b = 1` to it

  b = { name = "foo"; value = "bar"; }; # creates optimised K/V repr
  b.foo = 42; # wants to add an additional `foo = 42`
}
```

In these cases, the attribute set must be coerced to a map
representation first which is achieved by the new internal
NixAttr::map_mut helper.

Change-Id: Ia61d3d9d14c4e0f5e207c00f6a2f4daa3265afb2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6109
Reviewed-by: eta <tvl@eta.st>
Tested-by: BuildkiteCI
2022-08-24 18:19:52 +00:00
..
docs docs(tvix/eval): add design documentation for attrset opcodes 2022-08-13 15:31:50 +00:00
src feat(tvix/value): implement nested attribute set literals 2022-08-24 18:19:52 +00:00
.gitignore feat(tvix/eval): check in generated project skeleton 2022-08-12 12:34:29 +00:00
Cargo.lock chore(tvix/eval): add rnix-parser dependency 2022-08-12 12:39:19 +00:00
Cargo.toml chore(tvix/eval): add rnix-parser dependency 2022-08-12 12:39:19 +00:00
default.nix chore(tvix/eval): check in naersk-based default.nix 2022-08-12 12:39:19 +00:00
README.md docs(tvix/eval): Add initial evaluator README 2022-08-12 12:34:29 +00:00

Tvix Evaluator

This project implements an interpreter for the Nix programming language.

The interpreter aims to be compatible with nixpkgs, on the foundation of Nix 2.3.

Work on this project is extremely in-progress, and the state of the project in the public repository may not necessarily reflect the state of the private codebase, as we are slowly working on publishing it.

We expect this to have caught up in a handful of weeks (as of 2022-08-12).

Please contact TVL with any questions you might have.

rnix-parser

Tvix is written in memory of jD91mZM2, the author of rnix-parser who sadly passed away.

Tvix makes heavy use of rnix-parser in its bytecode compiler. The parser is now maintained by Nix community members.