From 0e2db3d20ccae2090f4a01d172e451c596da0c30 Mon Sep 17 00:00:00 2001 From: Kamen Mladenov Date: Mon, 3 Feb 2025 14:52:56 +0200 Subject: feat(zkvms_host_io): Add public_inputs and private_inputs attributes to RunWith --- zkvms_host_io/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'zkvms_host_io/src/lib.rs') diff --git a/zkvms_host_io/src/lib.rs b/zkvms_host_io/src/lib.rs index d63cb56..2624352 100644 --- a/zkvms_host_io/src/lib.rs +++ b/zkvms_host_io/src/lib.rs @@ -31,6 +31,8 @@ pub enum RunType { pub struct RunWith { pub run_type: RunType, pub input: Input, + pub public_input: PublicInput, + pub private_input: PrivateInput, pub default_env: HashMap, } @@ -66,13 +68,17 @@ pub fn read_args() -> RunWith { } else { DEFAULT_PRIVATE_INPUT.to_string() }; - let input: Input = toml::from_str(&(public_contents + &private_contents)).unwrap(); + let input: Input = toml::from_str(&(public_contents.clone() + &private_contents)).unwrap(); + let public_input: PublicInput = toml::from_str(&public_contents).unwrap(); + let private_input: PrivateInput = toml::from_str(&private_contents).unwrap(); let default_env = read_str(DEFAULT_ENV).unwrap(); RunWith { run_type: cli.run_type, input, + public_input, + private_input, default_env, } } -- cgit v1.2.3