Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-export postcard in runtime #280

Merged
merged 7 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cli/src/command/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,11 @@ fn setup_crate(host_path: PathBuf, rev: Option<String>, tag: Option<String>) ->
)?;

// add postcard because it is used for (de)serializing from/to the input/output tapes
evan-schott marked this conversation as resolved.
Show resolved Hide resolved
// Hardcode postcard version to 1.0.8
cargo(
Some(&guest_path),
[
"add",
"postcard@=1.0.8",
"[email protected].10",
"-F",
"alloc",
"--no-default-features",
Expand Down
4 changes: 2 additions & 2 deletions examples/src/bin/input_output.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#![cfg_attr(target_arch = "riscv32", no_std, no_main)]

use nexus_rt::{println, read_private_input, write_output};
use nexus_rt::{postcard, println, read_private_input, write_output};

#[nexus_rt::main]
fn main() {
let input = read_private_input::<(u32, u32)>();
let input: Result<(u32, u32), postcard::Error> = read_private_input::<(u32, u32)>();

let mut z: i32 = -1;
if let Ok((x, y)) = input {
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ categories = { workspace = true }

[dependencies]
nexus-rt-macros = { path = "macros", version = "0.1.0" }
postcard = { version = "=1.0.8", features = ["alloc"] }
postcard = { version = "1.0.10", features = ["alloc"], default_features = false }
serde = { version = "1.0", default-features = false }

[lib]
Expand Down
1 change: 1 addition & 0 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ pub use nexus_rt_macros::{main, profile};

mod ecalls;
pub use ecalls::*;
pub use postcard;
2 changes: 1 addition & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ serde.workspace = true

nexus-core = { path = "../core", features = ["prover_nova", "prover_jolt", "prover_hypernova"] }
nexus-macro = { path = "../macro" }
postcard = { version = "=1.0.8", features = ["alloc"] }
postcard = { version = "1.0.10", features = ["alloc"], default_features = false }
uuid = { version = "1.9.1", features = ["v4", "fast-rng"] }
thiserror = "1.0.61"

Expand Down