Logo
Explore Help
Sign In
logos-storage/plonky2
1
0
Fork 0
You've already forked plonky2
mirror of https://github.com/logos-storage/plonky2.git synced 2026-01-11 02:03:07 +00:00
Code Issues Packages Projects Releases Wiki Activity
plonky2/evm/src/cpu/kernel/mod.rs

17 lines
384 B
Rust
Raw Normal View History

Parse and assemble kernel functions (#567) * Parse and assemble kernel functions Written in "EVM++" assembly. Later on we will add some priviledged opcodes (in unused opcode ordinals), making it an extension of EVM bytecode. I don't think there's much of a standard for EVM assembly, but I loosely based the syntax on this [proposal](https://gist.github.com/axic/17ddbbce4738ccf4040d30cbb5de484e). * PR feedback * tweaks for consistency * terminology tweaks * Update evm/src/cpu/kernel/opcodes.rs Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org> * Update evm/src/cpu/kernel/opcodes.rs Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org> * Update evm/src/cpu/kernel/opcodes.rs Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org> Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
2022-06-20 20:32:29 -07:00
pub mod aggregator;
mod assembler;
mod ast;
mod opcodes;
mod parser;
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
use assembler::assemble;
use parser::parse;
/// 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);
kernel.code
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.0 Page: 41ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API