proposed changes

This commit is contained in:
Sergio Chouhy 2025-08-15 18:29:19 -03:00
parent 670092b451
commit cc458e3303
6 changed files with 4 additions and 20 deletions

View File

@ -2,7 +2,6 @@
name = "shake256-33bytes-demo"
version = "0.1.0"
edition = "2021"
build = "build.rs"
[[bin]]
name = "shake256-33bytes-demo"
@ -18,18 +17,10 @@ hkdf = "0.12"
sha3 = "0.10"
serde-big-array = "0.5"
tiny-keccak = { version = "2", default-features = false, features = ["shake"] } # ADD
methods = {path = "methods"}
[dev-dependencies]
rand = "0.8"
cipher = { version = "0.4", features = ["std"] }
serde = { version = "1", default-features = false, features = ["derive", "alloc"] }
[build-dependencies]
risc0-build = "2.3.1"
[package.metadata.risc0]
methods = ["methods/guest"]
[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(rust_analyzer)'] }

View File

@ -1,3 +0,0 @@
fn main() {
risc0_build::embed_methods();
}

View File

@ -7,4 +7,4 @@ edition = "2021"
risc0-build = { version = "2.3.1" }
[package.metadata.risc0]
methods = ["methods/guest"]
methods = ["guest"]

View File

@ -0,0 +1 @@
include!(concat!(env!("OUT_DIR"), "/methods.rs"));

View File

@ -1,10 +1,5 @@
use serde::{Deserialize, Serialize};
// ---------- expose generated guest constants ----------
pub mod methods {
include!(concat!(env!("OUT_DIR"), "/methods.rs"));
}
// -------------------------------------------------------
// ---------- 33-byte wrapper (public) ----------
pub mod ser_bytes33 { // (public so main.rs can use it)

View File

@ -3,7 +3,7 @@ use risc0_zkvm::{default_prover, ExecutorEnv};
use shake256_33bytes_demo::{EncInput, enc_xor_shake256, nssa_kdf}; // now works via re-exports
use shake256_33bytes_demo::ser_bytes33::Bytes33; // for constructing wrapper
use shake256_33bytes_demo::methods::GUEST_ELF; // generated guest image
use methods::GUEST_ELF; // generated guest image
fn main() -> anyhow::Result<()> {