mirror of
https://github.com/eth-act/ere.git
synced 2026-04-03 03:00:17 -04:00
Refactor docs and make Input API more explicit (#235)
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
use ere_platform_airbender::AirbenderPlatform;
|
||||
use ere_test_utils::{
|
||||
guest::Sha256,
|
||||
io::serde::bincode::BincodeLegacy,
|
||||
program::{basic::BasicProgram, Program},
|
||||
};
|
||||
@@ -16,5 +15,5 @@ mod airbender_rt;
|
||||
|
||||
#[inline(never)]
|
||||
fn main() {
|
||||
BasicProgram::<BincodeLegacy>::run::<AirbenderPlatform<Sha256>>();
|
||||
BasicProgram::<BincodeLegacy>::run_output_sha256::<AirbenderPlatform>();
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
use ere_platform_openvm::OpenVMPlatform;
|
||||
use ere_test_utils::{
|
||||
guest::Sha256,
|
||||
io::serde::bincode::BincodeLegacy,
|
||||
program::{basic::BasicProgram, Program},
|
||||
};
|
||||
|
||||
fn main() {
|
||||
BasicProgram::<BincodeLegacy>::run::<OpenVMPlatform<Sha256>>();
|
||||
BasicProgram::<BincodeLegacy>::run_output_sha256::<OpenVMPlatform>();
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use core::sync::atomic::Ordering;
|
||||
use core::sync::atomic::AtomicU16;
|
||||
use core::sync::atomic::Ordering;
|
||||
|
||||
mod openvm_rt;
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use core::sync::atomic::Ordering;
|
||||
use core::sync::atomic::AtomicU16;
|
||||
use core::sync::atomic::Ordering;
|
||||
|
||||
mod pico_rt;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use ere_platform_risc0::{Platform, Risc0Platform};
|
||||
|
||||
type P = Risc0Platform;
|
||||
use ere_platform_risc0::risc0_zkvm::guest::env::read_slice;
|
||||
|
||||
fn main() {
|
||||
let alignment = u32::from_le_bytes(P::read_whole_input().try_into().unwrap()) as usize;
|
||||
let mut alignment = [0; 4];
|
||||
read_slice(&mut alignment);
|
||||
let alignment = u32::from_le_bytes(alignment) as usize;
|
||||
|
||||
let layout = std::alloc::Layout::from_size_align(1, alignment).unwrap();
|
||||
let ptr = unsafe { std::alloc::alloc(layout) };
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use core::sync::atomic::Ordering;
|
||||
use core::sync::atomic::AtomicU16;
|
||||
use core::sync::atomic::Ordering;
|
||||
|
||||
mod risc0_rt;
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use core::sync::atomic::Ordering;
|
||||
use core::sync::atomic::AtomicU16;
|
||||
use core::sync::atomic::Ordering;
|
||||
|
||||
mod sp1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user