Skip to content

Commit

Permalink
Restore prove into metal feature (risc0#2195)
Browse files Browse the repository at this point in the history
With risc0#2092 dropping the `metal` feature and risc0#2179 restoring it as an
no-op feature, this PR restores the `prove` feature into it, with the
goal of maintaining semver compatibility.
  • Loading branch information
capossele authored Aug 9, 2024
1 parent 985cd62 commit d974e5d
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ jobs:
run: cargo test -p risc0-r0vm -F $FEATURE -F disable-dev-mode --no-run
- name: build risc0-zkvm tests without the prove feature
run: cargo test -p risc0-zkvm -F $FEATURE --no-run
- name: build risc0-zkvm tests with the metal feature
if: matrix.os == 'macOS'
run: cargo test -p risc0-zkvm -F metal --no-run
- name: test risc0-r0vm
run: cargo test -p risc0-r0vm -F $FEATURE -F disable-dev-mode
- run: cargo test -p cargo-risczero -F experimental
Expand Down
2 changes: 1 addition & 1 deletion risc0/cargo-risczero/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ experimental = [
"dep:zip",
"risc0-zkvm/prove",
]
metal = []
metal = ["risc0-zkvm/metal"]
r0vm = ["dep:risc0-r0vm"]
2 changes: 1 addition & 1 deletion risc0/circuit/recursion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ cuda = [
"std",
]
default = ["prove", "test"]
metal = []
metal = ["prove"]
prove = [
"dep:cfg-if",
"dep:downloader",
Expand Down
2 changes: 1 addition & 1 deletion risc0/circuit/rv32im/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cuda = [
"std",
]
default = ["prove"]
metal = []
metal = ["prove"]
prove = [
"dep:bytemuck",
"dep:cfg-if",
Expand Down
2 changes: 1 addition & 1 deletion risc0/r0vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ cuda = ["risc0-zkvm/cuda"]
default = []
disable-dev-mode = ["risc0-zkvm/disable-dev-mode"]
dual = ["risc0-zkvm/dual"]
metal = []
metal = ["risc0-zkvm/metal"]
2 changes: 1 addition & 1 deletion risc0/zkp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ features = ["prove", "std"]
circuit_debug = []
cuda = ["dep:cust", "prove", "risc0-sys/cuda"]
default = []
metal = []
metal = ["prove"]
metal_prefix_products = []
prove = [
"dep:ff",
Expand Down
2 changes: 1 addition & 1 deletion risc0/zkvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ getrandom = ["risc0-zkvm-platform/getrandom"]
heap-embedded-alloc = [
"risc0-zkvm-platform/heap-embedded-alloc"
]
metal = []
metal = ["prove"]
prove = [
"client",
"dep:addr2line",
Expand Down
7 changes: 7 additions & 0 deletions risc0/zkvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,10 @@ pub fn is_dev_mode() -> bool {

cfg!(not(feature = "disable-dev-mode")) && is_env_set
}

#[cfg(feature = "metal")]
#[test]
fn metal_implies_prove() {
// we should be able to access prove feature items when metal has been enabled
let _prover = get_prover_server(&ProverOpts::default());
}

0 comments on commit d974e5d

Please sign in to comment.