feat(tvix/eval): implement optional runtime tracing

This adds a `disassembler` feature to the crate configuration that
traces the operations executed and the state of the stack at runtime.

This can be enabled by compiling with `--feature disassembler`.

This will also gain a more sensible layout of code slices eventually.

Change-Id: I34c15e1cd346ecc4362b5afba6bf82dd49359d20
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6193
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-08-13 21:29:30 +03:00 committed by tazjin
parent dd0d624919
commit 57d0dbb1c6
5 changed files with 67 additions and 1 deletions

10
tvix/eval/Cargo.lock generated
View file

@ -777,6 +777,15 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "tabwriter"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36205cfc997faadcc4b0b87aaef3fbedafe20d38d4959a7ca6ff803564051111"
dependencies = [
"unicode-width",
]
[[package]]
name = "test-generator"
version = "0.3.0"
@ -844,6 +853,7 @@ dependencies = [
"rnix",
"rustyline",
"smol_str",
"tabwriter",
"test-generator",
]