diff options
| author | Kamen Mladenov <kamen@syndamia.com> | 2025-01-30 11:55:28 +0200 |
|---|---|---|
| committer | Kamen Mladenov <kamen@syndamia.com> | 2025-01-30 11:55:28 +0200 |
| commit | ac4a996f7ee167f93db1820524130b29cec0421a (patch) | |
| tree | 2d6798e63b05664886c6853d79b03420c6f5be48 /zkvms/nexus | |
| parent | b5a2c3dde173751d88a939323a182418e2f9f688 (diff) | |
| download | zkVMs-benchmarks-ac4a996f7ee167f93db1820524130b29cec0421a.tar zkVMs-benchmarks-ac4a996f7ee167f93db1820524130b29cec0421a.tar.gz zkVMs-benchmarks-ac4a996f7ee167f93db1820524130b29cec0421a.zip | |
feat(nexus): Adapt to new input type and zkvmLib
Diffstat (limited to 'zkvms/nexus')
| -rw-r--r-- | zkvms/nexus/Cargo.toml | 20 | ||||
| -rw-r--r-- | zkvms/nexus/default.nix | 10 | ||||
| -rw-r--r-- | zkvms/nexus/guest/Cargo.lock | 194 | ||||
| -rw-r--r-- | zkvms/nexus/guest/Cargo.toml | 6 | ||||
| -rw-r--r-- | zkvms/nexus/host/Cargo.lock (renamed from zkvms/nexus/Cargo.lock) | 160 | ||||
| -rw-r--r-- | zkvms/nexus/host/Cargo.toml | 4 |
6 files changed, 257 insertions, 137 deletions
diff --git a/zkvms/nexus/Cargo.toml b/zkvms/nexus/Cargo.toml deleted file mode 100644 index c966357..0000000 --- a/zkvms/nexus/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[workspace] -resolver = "2" -members = [ - "host", - "guest/guests/*", -] - -[patch.crates-io] -ark-crypto-primitives = { git = "https://github.com/arkworks-rs/crypto-primitives/", rev = "d27a5c8" } -ark-r1cs-std = { git = "https://github.com/arkworks-rs/r1cs-std/", rev = "2ca3bd7" } -ark-ff = { git = "https://github.com/arkworks-rs/algebra/", rev = "2a80c54" } -ark-ec = { git = "https://github.com/arkworks-rs/algebra/", rev = "2a80c54" } -ark-serialize = { git = "https://github.com/arkworks-rs/algebra/", rev = "2a80c54" } -ark-poly = { git = "https://github.com/arkworks-rs/algebra/", rev = "2a80c54" } -ark-test-curves = { git = "https://github.com/arkworks-rs/algebra/", rev = "2a80c54" } -ark-poly-commit = { git = "https://github.com/arkworks-rs/poly-commit/", rev = "12f5529" } -ark-bn254 = { git = "https://github.com/arkworks-rs/curves/", rev = "8c0256a" } -ark-pallas = { git = "https://github.com/arkworks-rs/curves/", rev = "8c0256a" } -ark-vesta = { git = "https://github.com/arkworks-rs/curves/", rev = "8c0256a" } -ark-bls12-381 = { git = "https://github.com/arkworks-rs/curves/", rev = "3fded1f" } diff --git a/zkvms/nexus/default.nix b/zkvms/nexus/default.nix index 7a706e9..b53052a 100644 --- a/zkvms/nexus/default.nix +++ b/zkvms/nexus/default.nix @@ -1,4 +1,4 @@ -{ zkVM-helpers, +{ zkvmLib, stdenv, lib, just, @@ -23,8 +23,6 @@ let ]); }; - cargoLock = ./Cargo.lock; - nativeBuildInputs = [ metacraft-labs.nexus openssl @@ -33,9 +31,9 @@ let }; craneLib = craneLib-default.overrideToolchain metacraft-labs.nexus; - cargoArtifacts = craneLib.buildDepsOnly (zkVM-helpers.fixDeps commonArgs); + cargoArtifacts = zkvmLib.buildDepsOnly craneLib commonArgs; in - craneLib.buildPackage (zkVM-helpers.withCustomPhases (commonArgs + zkvmLib.buildPackage craneLib (commonArgs // rec { inherit cargoArtifacts; @@ -56,4 +54,4 @@ in ''; doCheck = false; - })) + }) diff --git a/zkvms/nexus/guest/Cargo.lock b/zkvms/nexus/guest/Cargo.lock new file mode 100644 index 0000000..b632880 --- /dev/null +++ b/zkvms/nexus/guest/Cargo.lock @@ -0,0 +1,194 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "guest" +version = "0.1.0" +dependencies = [ + "nexus-rt", + "postcard", + "wrapper_macro", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + +[[package]] +name = "indexmap" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "nexus-rt" +version = "0.2.4" +dependencies = [ + "nexus-rt-macros", + "postcard", + "serde", +] + +[[package]] +name = "nexus-rt-macros" +version = "0.1.0" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "postcard" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "serde", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "serde" +version = "1.0.217" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.217" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "unicode-ident" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" + +[[package]] +name = "winnow" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad699df48212c6cc6eb4435f35500ac6fd3b9913324f938aea302022ce19d310" +dependencies = [ + "memchr", +] + +[[package]] +name = "wrapper_macro" +version = "0.1.0" diff --git a/zkvms/nexus/guest/Cargo.toml b/zkvms/nexus/guest/Cargo.toml index 0ba0f1a..598e1a8 100644 --- a/zkvms/nexus/guest/Cargo.toml +++ b/zkvms/nexus/guest/Cargo.toml @@ -3,14 +3,8 @@ name = "guest" version = "0.1.0" edition = "2021" -[workspace] - [dependencies] nexus-rt = { path = "/nix/store/krlanfap664k4g88qgsssxi0818z92r8-Nexus-zkVM-unstable-2024-12-18/runtime" } postcard = { version = "1.0.10", default-features = false, features = ["alloc"] } -zkp = { path = "./src/zkp" } wrapper_macro = { version = "0.1.0", path = "../wrapper_macro" } - -[features] -no_std = ["zkp/no_std"] diff --git a/zkvms/nexus/Cargo.lock b/zkvms/nexus/host/Cargo.lock index 803b61d..f63983c 100644 --- a/zkvms/nexus/Cargo.lock +++ b/zkvms/nexus/host/Cargo.lock @@ -535,9 +535,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byte-tools" @@ -712,9 +712,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -1163,6 +1163,18 @@ dependencies = [ ] [[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + +[[package]] name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1180,10 +1192,6 @@ dependencies = [ ] [[package]] -name = "guests_macro" -version = "0.1.0" - -[[package]] name = "h2" version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1295,7 +1303,6 @@ name = "host-nexus" version = "0.1.0" dependencies = [ "nexus-sdk", - "postcard", "zkvms_host_io", ] @@ -1335,15 +1342,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "hyper" -version = "1.5.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", @@ -1568,9 +1575,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.9" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" dependencies = [ "console", "number_prefix", @@ -1828,9 +1835,9 @@ checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" dependencies = [ "libc", "log", @@ -2070,9 +2077,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.68" +version = "0.10.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +checksum = "f5e534d133a060a3c19daec1eb3e98ec6f4685978834f2dbadfe2ec215bab64e" dependencies = [ "bitflags 2.8.0", "cfg-if", @@ -2096,9 +2103,9 @@ dependencies = [ [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" @@ -2607,9 +2614,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" [[package]] name = "rustls-webpki" @@ -2641,9 +2648,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "schannel" @@ -2716,9 +2723,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.137" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -2990,13 +2997,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.15.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" +checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" dependencies = [ "cfg-if", "fastrand", - "getrandom 0.2.15", + "getrandom 0.3.1", "once_cell", "rustix", "windows-sys 0.59.0", @@ -3313,9 +3320,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11cd88e12b17c6494200a9c1b683a04fcac9573ed74cd1b62aeb2727c5592243" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "unicode-width" @@ -3409,6 +3416,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] name = "wasm-bindgen" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3701,14 +3717,23 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.24" +version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" +checksum = "ad699df48212c6cc6eb4435f35500ac6fd3b9913324f938aea302022ce19d310" dependencies = [ "memchr", ] [[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + +[[package]] name = "write16" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3838,13 +3863,6 @@ dependencies = [ ] [[package]] -name = "zkp" -version = "0.1.0" -dependencies = [ - "guests_macro", -] - -[[package]] name = "zkvms_host_io" version = "0.1.0" dependencies = [ @@ -3883,63 +3901,3 @@ dependencies = [ "cc", "pkg-config", ] - -[[patch.unused]] -name = "ark-bls12-381" -version = "0.4.0" -source = "git+https://github.com/arkworks-rs/curves/?rev=3fded1f#3fded1fbccf7c5491930dd8340c9b4567355d509" - -[[patch.unused]] -name = "ark-bn254" -version = "0.4.0" -source = "git+https://github.com/arkworks-rs/curves/?rev=8c0256a#8c0256ac9c479b4b3beb91bfcc11dc17e58b3819" - -[[patch.unused]] -name = "ark-crypto-primitives" -version = "0.4.0" -source = "git+https://github.com/arkworks-rs/crypto-primitives/?rev=d27a5c8#d27a5c834a36eb932bb12849e5c520758058373d" - -[[patch.unused]] -name = "ark-ec" -version = "0.4.2" -source = "git+https://github.com/arkworks-rs/algebra/?rev=2a80c54#2a80c54687582f49cbbe9a27b94071e1a500f056" - -[[patch.unused]] -name = "ark-ff" -version = "0.4.2" -source = "git+https://github.com/arkworks-rs/algebra/?rev=2a80c54#2a80c54687582f49cbbe9a27b94071e1a500f056" - -[[patch.unused]] -name = "ark-pallas" -version = "0.4.0" -source = "git+https://github.com/arkworks-rs/curves/?rev=8c0256a#8c0256ac9c479b4b3beb91bfcc11dc17e58b3819" - -[[patch.unused]] -name = "ark-poly" -version = "0.4.2" -source = "git+https://github.com/arkworks-rs/algebra/?rev=2a80c54#2a80c54687582f49cbbe9a27b94071e1a500f056" - -[[patch.unused]] -name = "ark-poly-commit" -version = "0.4.0" -source = "git+https://github.com/arkworks-rs/poly-commit/?rev=12f5529#12f5529c9ca609d07dd4683fcd1e196bc375eb0d" - -[[patch.unused]] -name = "ark-r1cs-std" -version = "0.4.0" -source = "git+https://github.com/arkworks-rs/r1cs-std/?rev=2ca3bd7#2ca3bd7d97ac2674a09fed63ace16b4f181531b1" - -[[patch.unused]] -name = "ark-serialize" -version = "0.4.2" -source = "git+https://github.com/arkworks-rs/algebra/?rev=2a80c54#2a80c54687582f49cbbe9a27b94071e1a500f056" - -[[patch.unused]] -name = "ark-test-curves" -version = "0.4.2" -source = "git+https://github.com/arkworks-rs/algebra/?rev=2a80c54#2a80c54687582f49cbbe9a27b94071e1a500f056" - -[[patch.unused]] -name = "ark-vesta" -version = "0.4.0" -source = "git+https://github.com/arkworks-rs/curves/?rev=8c0256a#8c0256ac9c479b4b3beb91bfcc11dc17e58b3819" diff --git a/zkvms/nexus/host/Cargo.toml b/zkvms/nexus/host/Cargo.toml index 6ace3f7..c27b920 100644 --- a/zkvms/nexus/host/Cargo.toml +++ b/zkvms/nexus/host/Cargo.toml @@ -7,7 +7,3 @@ edition = "2021" nexus-sdk = { path = "/nix/store/krlanfap664k4g88qgsssxi0818z92r8-Nexus-zkVM-unstable-2024-12-18/sdk" } zkvms_host_io = { path = "../../../zkvms_host_io" } - -# THESE ARE A COPY OF THE GUEST DEPENDENCIES -# They're here as a hack, so crane.lib will fetch them -postcard = { version = "1.0.10", default-features = false, features = ["alloc"] } |
