mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-09 01:03:08 +00:00
Using a method Angus described. This is mainly his idea and code, I just ported it to Rust.
34 lines
702 B
Rust
34 lines
702 B
Rust
pub mod aggregator;
|
|
pub mod assembler;
|
|
mod ast;
|
|
mod constants;
|
|
mod context_metadata;
|
|
mod cost_estimator;
|
|
mod global_metadata;
|
|
pub(crate) mod keccak_util;
|
|
mod opcodes;
|
|
mod optimizer;
|
|
mod parser;
|
|
pub mod prover_input;
|
|
pub mod stack;
|
|
mod txn_fields;
|
|
mod utils;
|
|
|
|
#[cfg(test)]
|
|
mod interpreter;
|
|
#[cfg(test)]
|
|
mod tests;
|
|
|
|
use assembler::assemble;
|
|
use parser::parse;
|
|
|
|
use crate::cpu::kernel::constants::evm_constants;
|
|
|
|
/// Assemble files, outputting bytes.
|
|
/// This is for debugging the kernel only.
|
|
pub fn assemble_to_bytes(files: &[String]) -> Vec<u8> {
|
|
let parsed_files: Vec<_> = files.iter().map(|f| parse(f)).collect();
|
|
let kernel = assemble(parsed_files, evm_constants(), true);
|
|
kernel.code
|
|
}
|