Browse Source

Have the dump feature apply to the main sigma-compiler crate, not just sigma-compiler-core

That way, we can expose a dump API in sigma-compiler only when the
feature is enabled.
Ian Goldberg 1 month ago
parent
commit
46cf51d15c
3 changed files with 17 additions and 3 deletions
  1. 6 0
      Cargo.toml
  2. 4 3
      sigma-compiler-core/Cargo.toml
  3. 7 0
      sigma-compiler-derive/Cargo.toml

+ 6 - 0
Cargo.toml

@@ -17,6 +17,12 @@ subtle = "2.6"
 curve25519-dalek = { version = "4", features = [ "group", "rand_core", "digest" ] }
 sha2 = "0.10"
 
+[features]
+# Dump (to stdout or to a string) the value of the instance on both the
+# prover's and verifier's side.  They should match.
+dump = [ "sigma-compiler-derive/dump" ]
+# default = ["dump"]
+
 [patch.crates-io]
 sigma-compiler-derive = { path = "sigma-compiler-derive" }
 sigma-compiler-core = { path = "sigma-compiler-core" }

+ 4 - 3
sigma-compiler-core/Cargo.toml

@@ -14,7 +14,8 @@ clap = { version = "4.5", features = ["derive"] }
 prettyplease = "0.2"
 
 [features]
-# Dump (to stdout) the value of the instance on both the prover's and
-# verifier's side.  They should match.
+# Dump (to stdout or to a string) the value of the instance on both the
+# prover's and verifier's side.  They should match.
+# Note: enable this feature (if you want it) in the sigma-compiler
+# crate, not here.
 dump = []
-# default = ["dump"]

+ 7 - 0
sigma-compiler-derive/Cargo.toml

@@ -13,5 +13,12 @@ proc-macro = true
 sigma-compiler-core = "0.1.0"
 syn = "2.0"
 
+[features]
+# Dump (to stdout or to a string) the value of the instance on both the
+# prover's and verifier's side.  They should match.
+# Note: enable this feature (if you want it) in the sigma-compiler
+# crate, not here.
+dump = [ "sigma-compiler-core/dump" ]
+
 [patch.crates-io]
 sigma-compiler-core = { path = "../sigma-compiler-core" }