Skip to content

feat: add support for go program#254

Merged
eigmax merged 8 commits intoProjectZKM:mainfrom
weilzkm:go-runtime
Sep 21, 2025
Merged

feat: add support for go program#254
eigmax merged 8 commits intoProjectZKM:mainfrom
weilzkm:go-runtime

Conversation

@weilzkm
Copy link
Copy Markdown
Contributor

@weilzkm weilzkm commented Jul 24, 2025

Test simple go example:

cd example/simple-go/guest
GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build .
cd ../host
cargo run -r

zkm runtime for go provides I/O API, the guest program can read input, commit output by zkm_runtime.Read[<type>](), zkm_runtime.Commit[<type>]()

MAY TODO: add go support as an additional feature

@weilzkm weilzkm marked this pull request as ready for review August 12, 2025 01:04
add initial constraints for linux syscalls

redirect runtime.exit to zkvm.runtimeexit

fix cycle field in syscall id

fix example/fibonacci

fix cycles bug and constraint bug in mmap

fix fmt

fix syscall code, and constraints for gt operation and clone syscall

fix send_to_table

fix mismatch in send/receive syscall

fix rebase and fmt problem

fix clippy

add build.rs for simple go
Comment thread crates/core/executor/src/events/precompiles/linux.rs Outdated
Comment thread crates/core/executor/src/events/precompiles/linux.rs Outdated
Comment thread crates/core/executor/src/executor.rs Outdated
Comment thread crates/core/executor/src/program.rs Outdated
Comment thread crates/core/executor/src/syscalls/precompiles/sys_linux/sysbrk.rs Outdated
Comment thread crates/core/executor/src/syscalls/precompiles/sys_linux/syswrite.rs Outdated
Comment thread crates/go-runtime/zkvm_runtime/syscall_mipsle.s Outdated
Comment thread examples/simple-go/host/build.rs Outdated
Comment thread crates/go-runtime/zkvm_runtime/go.mod Outdated
Comment thread crates/core/machine/src/syscall/precompiles/sys_linux/air.rs
(self as u32).to_le_bytes()[2].into()
}

/// Get whether the handler of the system call has its own table.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The definition is repeated in the should_send function above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. Can you tell me where? I didn't find another should_send.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I forgot to update the comments for linux_sys.

Co-authored-by: Blake <148928866+blake-pro@users.noreply.github.com
@eigmax eigmax merged commit 2e0befe into ProjectZKM:main Sep 21, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants