plonky2/evm/src/bin/assemble.rs
Jacqueline Nabaglo e3834a5335
Util for assembling EVM code to hex (#586)
This is just for debugging the kernel. It's fully disposable.
2022-06-27 18:08:03 -07:00

14 lines
351 B
Rust

use std::env;
use std::fs;
use hex::encode;
use plonky2_evm::cpu::kernel::assemble_to_bytes;
fn main() {
let mut args = env::args();
args.next();
let file_contents: Vec<_> = args.map(|path| fs::read_to_string(path).unwrap()).collect();
let assembled = assemble_to_bytes(&file_contents[..]);
println!("{}", encode(&assembled));
}