Daniel Lubarov 763d63de08 For permutations, find the optimal sequence of swaps
Using a method Angus described. This is mainly his idea and code, I just ported it to Rust.
2022-08-09 16:33:02 -04:00

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
}