diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-03T16·40+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-09T10·48+0000 |
commit | 8c64ebe074c9fc99c2174769f5e3c13755b82c55 (patch) | |
tree | f4e24a03d8066330cfc7c94881d8d1174b8c3526 /tvix/eval | |
parent | 8fdb67847cc1f68ca88dfe7a282f30e9f6ab2cc9 (diff) |
chore(tvix/eval): gate REPL-only dependencies behind `repl` feature r/4772
With this change, it becomes possible to compile tvix-eval to webassembly if the `repl` feature is disabled. Change-Id: Icc0a059964cd0bea2054110c682d50fc5c87ec01 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6446 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval')
-rw-r--r-- | tvix/eval/Cargo.toml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tvix/eval/Cargo.toml b/tvix/eval/Cargo.toml index 4f2fda7e613a..226f3a98a31f 100644 --- a/tvix/eval/Cargo.toml +++ b/tvix/eval/Cargo.toml @@ -5,9 +5,16 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +name = "tvix_eval" + +[[bin]] +name = "tvix-eval" +required-features = [ "repl" ] + [dependencies] smol_str = "0.1" -rustyline = "10.0.0" +rustyline = { version = "10.0.0", optional = true } dirs = "4.0.0" path-clean = "0.1" tabwriter = { version = "1.2", optional = true } @@ -27,10 +34,15 @@ pretty_assertions = "1.2.1" itertools = "0.10.3" [features] +default = [ "repl" ] + # Enables running the Nix language test suite from the original C++ # Nix implementation (at version 2.3) against Tvix. nix_tests = [] +# Enables building the binary (tvix-eval REPL) +repl = [ "dep:rustyline" ] + # Enables printing compiled code and tracing the stack state at runtime. disassembler = ["dep:tabwriter"] |