Skip to content
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
13 changes: 13 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ jobs:
cd "$GITHUB_WORKSPACE/tools/test-env"
./build_zisk.sh

- name: Check libziskos.a does not bundle std
run: |
cargo +zisk build -p ziskos --release \
--target riscv64ima-zisk-zkvm-elf \
--config 'profile.release.lto="fat"'
LIBZISKOS=$(find target -name "libziskos.a" -path "*riscv64ima*" | head -1)
if ar t "$LIBZISKOS" | grep -q std; then
echo "FAIL: libziskos.a contains std object files:"
ar t "$LIBZISKOS" | grep std
exit 1
fi
echo "OK: libziskos.a contains no std object files"

- name: Build setup
env:
USE_CACHE_SETUP: "1"
Expand Down
2 changes: 2 additions & 0 deletions definitions/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![no_std]

mod syscall;
pub use syscall::*;

Expand Down
11 changes: 11 additions & 0 deletions ziskos/entrypoint/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#![cfg_attr(all(target_os = "zkvm", target_vendor = "zisk"), no_std)]
#![cfg_attr(all(target_os = "zkvm", target_vendor = "zisk"), feature(core_intrinsics))]
#![cfg_attr(all(target_os = "zkvm", target_vendor = "zisk"), allow(internal_features))]
#![allow(unexpected_cfgs)]
#![allow(unused_imports)]

Expand Down Expand Up @@ -457,4 +459,13 @@ pub mod ziskos {
core::arch::global_asm!(include_str!("dma/memcmp.s"));
//core::arch::global_asm!(include_str!("dma/inputcpy.s"));
core::arch::global_asm!(include_str!("dma/memset.s"));

#[panic_handler]
fn panic(info: &core::panic::PanicInfo) -> ! {
if let Some(msg) = info.message().as_str() {
sys_write(1, msg.as_ptr(), msg.len());
sys_write(1, b"\n".as_ptr(), 1);
}
core::intrinsics::abort()
}
}
3 changes: 0 additions & 3 deletions ziskos/entrypoint/src/zisklib/lib/bn254/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
#[cfg(all(target_os = "zkvm", target_vendor = "zisk"))]
use crate::alloc_extern::vec::Vec;

#[cfg(not(all(target_os = "zkvm", target_vendor = "zisk")))]
use num_traits::ops::bytes;

use crate::{
syscalls::{
syscall_bn254_curve_add, syscall_bn254_curve_dbl, SyscallBn254CurveAddParams,
Expand Down
1 change: 1 addition & 0 deletions zkvm-interface/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fn main() {
.header(&accelerators_header)
.header(&io_header)
.clang_arg("-std=c11")
.use_core()
.allowlist_type("zkvm_.*")
.allowlist_var("ZKVM_.*")
.allowlist_function("^zkvm_.*|^read_input$|^write_output$")
Expand Down
1 change: 1 addition & 0 deletions zkvm-interface/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![no_std]
//! zkVM C Interface Bindings
//!
//! This crate provides Rust bindings generated by bindgen from the standard zkVM
Expand Down