Skip to content

Commit

Permalink
Fix warning about using features in patch for smartcore (risc0#1017)
Browse files Browse the repository at this point in the history
Modify the smartcore-ml example to use smartcore as a direct dependency,
silencing a warning and avoiding unnecessary use of the patch mechanism.
  • Loading branch information
nategraf authored Oct 24, 2023
1 parent 15d7ac4 commit c272d48
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
21 changes: 18 additions & 3 deletions examples/Cargo.lock

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

3 changes: 0 additions & 3 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,3 @@ lto = true

[profile.release.build-override]
opt-level = 3

[patch.crates-io]
smartcore = { git = "https://github.com/risc0/smartcore.git", features = ["serde"] }
3 changes: 2 additions & 1 deletion examples/smartcore-ml/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ edition = "2021"
risc0-zkvm = { path = "../../risc0/zkvm" }
rmp-serde = "1.1"
serde_json = "1.0"
smartcore = { version = "0.3", features = ["serde"] }
# Using git dependency as a workaround for https://github.com/smartcorelib/smartcore/issues/267
smartcore = { git = "https://github.com/risc0/smartcore.git", rev = "4bd3cadd50ed988c45c239f5264c3e2c2af0a690", features = ["serde"] }
smartcore-ml-methods = { path = "methods" }

[features]
Expand Down
2 changes: 1 addition & 1 deletion examples/smartcore-ml/methods/guest/Cargo.lock

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

6 changes: 2 additions & 4 deletions examples/smartcore-ml/methods/guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ edition = "2021"
risc0-zkvm = { path = "../../../../risc0/zkvm", default-features = false, features = [
"std",
] }
smartcore = { version = "0.3", features = ["serde"]}

[patch.crates-io]
smartcore = { git = "https://github.com/risc0/smartcore.git", features = ['serde'] }
# Using git dependency as a workaround for https://github.com/smartcorelib/smartcore/issues/267
smartcore = { git = "https://github.com/risc0/smartcore.git", rev = "4bd3cadd50ed988c45c239f5264c3e2c2af0a690", features = ["serde"]}

0 comments on commit c272d48

Please sign in to comment.