Skip to content

Commit

Permalink
registers in memory
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardoalt authored and Leo Alt committed Jun 14, 2024
1 parent 3113a69 commit 2284f46
Show file tree
Hide file tree
Showing 5 changed files with 800 additions and 843 deletions.
5 changes: 0 additions & 5 deletions pipeline/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ pub fn serde_data_to_query_callback<T: FieldElement, S: serde::Serialize + Send
data: &S,
) -> impl QueryCallback<T> {
let bytes = serde_cbor::to_vec(&data).unwrap();
println!("Serde Data: {} bytes", bytes.len());
move |query: &str| -> Result<Option<T>, String> {
println!("Serde Query: {query}");
let (id, data) = parse_query(query)?;
match id {
"None" => Ok(None),
Expand Down Expand Up @@ -154,7 +152,6 @@ pub fn dict_data_to_query_callback<T: FieldElement>(
dict: BTreeMap<u32, Vec<T>>,
) -> impl QueryCallback<T> {
move |query: &str| -> Result<Option<T>, String> {
println!("Dict Query: {query}");
let (id, data) = parse_query(query)?;
match id {
"None" => Ok(None),
Expand Down Expand Up @@ -189,7 +186,6 @@ pub fn dict_data_to_query_callback<T: FieldElement>(

pub fn inputs_to_query_callback<T: FieldElement>(inputs: Vec<T>) -> impl QueryCallback<T> {
move |query: &str| -> Result<Option<T>, String> {
println!("Input Query: {query}");
let (id, data) = parse_query(query)?;
match id {
"None" => Ok(None),
Expand All @@ -205,7 +201,6 @@ pub fn inputs_to_query_callback<T: FieldElement>(inputs: Vec<T>) -> impl QueryCa
#[allow(clippy::print_stdout)]
pub fn handle_simple_queries_callback<'a, T: FieldElement>() -> impl QueryCallback<T> + 'a {
move |query: &str| -> Result<Option<T>, String> {
println!("Simple Query: {query}");
let (id, data) = parse_query(query)?;
match id {
"None" => Ok(None),
Expand Down
1 change: 0 additions & 1 deletion riscv-runtime/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use powdr_riscv_syscalls::Syscall;

use alloc::vec;
use alloc::vec::Vec;
use super::print;

/// Reads a single u32 from the file descriptor fd.
pub fn read_u32(fd: u32) -> u32 {
Expand Down
Loading

0 comments on commit 2284f46

Please sign in to comment.