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

[debug] support guest program "println!" #632

Open
lispc opened this issue Nov 26, 2024 · 2 comments
Open

[debug] support guest program "println!" #632

lispc opened this issue Nov 26, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@lispc
Copy link
Collaborator

lispc commented Nov 26, 2024

Host(emulator) will handle the syscall, and print the content to stdout.

The circuits will treat this as a no-op.

@lispc lispc added the good first issue Good for newcomers label Nov 26, 2024
@matthiasgoergens
Copy link
Collaborator

matthiasgoergens commented Nov 26, 2024

To add some context: we also need to specify what happens in the circuits.

I would also suggest making this a no-op in the circuits just for simplicity.

@naure
Copy link
Collaborator

naure commented Nov 26, 2024

There is a demo of this as a starting point:

println!("📜📜📜 Hello, World!");

macro_rules! println {

assert_eq!(&all_messages[0], "📜📜📜 Hello, World!\n".as_bytes());

From there, to avoid the proving cost of even generating the message, we can use a a debug! macro (conditional prints or conditional compilation), and run the program in debug or production mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Todo
Development

No branches or pull requests

3 participants