Skip to content

Commit

Permalink
Make "native" feature non default (#664)
Browse files Browse the repository at this point in the history
* Disabling default native feature

* Fixes after rebase
  • Loading branch information
citizen-stig committed Aug 22, 2023
1 parent a050971 commit 597f324
Show file tree
Hide file tree
Showing 36 changed files with 226 additions and 267 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions adapters/celestia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ borsh = { workspace = true, features = ["bytes"] }
bech32 = { workspace = true }
prost = "0.11"
prost-types = "0.11"
# I keep this commented as a reminder to opportunity to optimze this crate for non native compilation
#tendermint = { version = "0.32", default-features = false, features = ["std"] }
tendermint = "0.32"
tendermint-proto = "0.32"

Expand All @@ -23,13 +25,13 @@ hex = { version = "0.4.3", features = ["serde"] }
hex-literal = "0.4.1"
jsonrpsee = { version = "0.16.2", features = ["http-client"], optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_json = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
thiserror = { workspace = true }
tracing = { workspace = true }
zk-cycle-macros = {path = "../../utils/zk-cycle-macros", optional=true}
risc0-zkvm = { version = "0.16", default-features = false, features = ["std"], optional=true}
risc0-zkvm-platform = { version = "0.16", optional=true}
zk-cycle-macros = { path = "../../utils/zk-cycle-macros", optional = true }
risc0-zkvm = { version = "0.16", default-features = false, features = ["std"], optional = true }
risc0-zkvm-platform = { version = "0.16", optional = true }

sov-rollup-interface = { path = "../../rollup-interface" }
nmt-rs = { git = "https://github.com/Sovereign-Labs/nmt-rs.git", rev = "dd37588444fca72825d11fe4a46838f66525c49f", features = ["serde", "borsh"] }
Expand All @@ -45,7 +47,7 @@ wiremock = "0.5"
prost-build = { version = "0.11" }

[features]
default = ["native"]
native = ["dep:tokio", "dep:jsonrpsee"]
bench = ["zk-cycle-macros/bench","risc0-zkvm","risc0-zkvm-platform"]
default = []
native = ["dep:tokio", "dep:jsonrpsee", "dep:serde_json", "tendermint/default"]
bench = ["zk-cycle-macros/bench", "risc0-zkvm", "risc0-zkvm-platform"]
verifier = []
12 changes: 6 additions & 6 deletions adapters/risc0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ readme = "README.md"
[dependencies]
anyhow = { workspace = true }
bincode = { workspace = true }
risc0-zkvm = { version = "0.16", default-features = false, features = ['std'] }
risc0-zkvm = { version = "0.16", default-features = false, features = ["std"] }
risc0-zkvm-platform = { version = "0.16" }
risc0-zkp = { version = "0.16", optional = true }
risc0-circuit-rv32im = { version = "0.16", optional = true }
serde = { workspace = true }
bytemuck = "1.13.1"
once_cell = { version = "1.7.2", optional = true}
parking_lot = { version = "0.12.1", optional = true}
zk-cycle-utils = { path = "../../utils/zk-cycle-utils"}
once_cell = { version = "1.7.2", optional = true }
parking_lot = { version = "0.12.1", optional = true }
zk-cycle-utils = { path = "../../utils/zk-cycle-utils" }
sov-rollup-interface = { path = "../../rollup-interface" }

[features]
default = ["native"]
default = []
native = ["risc0-zkvm/prove", "dep:risc0-zkp", "dep:risc0-circuit-rv32im"]
bench = ["once_cell","parking_lot"]
bench = ["once_cell", "parking_lot"]
8 changes: 5 additions & 3 deletions examples/demo-nft-module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@ anyhow = { workspace = true }
borsh = { workspace = true, features = ["rc"] }
serde = { workspace = true, optional = true }

sov-modules-api = { path = "../../module-system/sov-modules-api", default-features = false, features = ["macros"] }
sov-state = { path = "../../module-system/sov-state", default-features = false }
sov-modules-api = { path = "../../module-system/sov-modules-api" }
sov-state = { path = "../../module-system/sov-state" }

jsonrpsee = { workspace = true, features = ["macros", "client-core", "server"], optional = true }

[dev-dependencies]
sov-rollup-interface = { path = "../../rollup-interface" }
sov-data-generators = { path = "../../module-system/utils/sov-data-generators" }
tempfile = { workspace = true }
demo-nft-module = { version = "*", features = ["native"], path = "." }


[features]
default = ["native"]
default = []
serde = ["dep:serde"]
native = ["serde", "sov-state/native", "sov-modules-api/native", "jsonrpsee"]
test = ["native"]
51 changes: 26 additions & 25 deletions examples/demo-prover/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions examples/demo-prover/host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resolver = "2"
[dependencies]
anyhow = { workspace = true }
borsh = { workspace = true }
bincode = {workspace = true}
bincode = { workspace = true }
hex = { workspace = true }
jsonrpsee = { workspace = true, features = ["http-client", "server"] }
risc0-zkvm = { workspace = true }
Expand All @@ -19,21 +19,21 @@ tokio = { workspace = true }
tracing = "0.1.37"
tracing-subscriber = "0.3.16"

celestia = { path = "../../../adapters/celestia", features = ["native","bench"] }
demo-stf = { path = "../../demo-stf" }
celestia = { path = "../../../adapters/celestia", features = ["native", "bench"] }
demo-stf = { path = "../../demo-stf", features = ["native"] }
sov-rollup-interface = { path = "../../../rollup-interface" }
risc0-adapter = { path = "../../../adapters/risc0" }
risc0-adapter = { path = "../../../adapters/risc0", features = ["native"] }
const-rollup-config = { path = "../../const-rollup-config" }
sov-modules-api = { path = "../../../module-system/sov-modules-api", features = ["native"] }
sov-state = { path = "../../../module-system/sov-state", features = ["native"] }
zk-cycle-macros = { path = "../../../utils/zk-cycle-macros", optional=true }
zk-cycle-macros = { path = "../../../utils/zk-cycle-macros", optional = true }
sov-stf-runner = { path = "../../../full-node/sov-stf-runner" }

methods = { path = "../methods" }


[dev-dependencies]
sov-demo-rollup = {path = "../../demo-rollup"}
sov-demo-rollup = { path = "../../demo-rollup" }
tempfile = { workspace = true }
once_cell = "1.7.2"
parking_lot = "0.11.1"
Expand Down
Loading

0 comments on commit 597f324

Please sign in to comment.