zingen/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//! Code generation library for zink.
#![deny(missing_docs)]
#![recursion_limit = "1024"]

pub use crate::{
    asm::Assembler,
    codegen::{Code, Constructor, Dispatcher, Function, InitStorage},
    control::{ControlStack, ControlStackFrame, ControlStackFrameType},
    jump::JumpTable,
    local::{LocalSlot, Locals},
    masm::MacroAssembler,
    result::{Error, Result},
};
use smallvec::SmallVec;

mod asm;
mod backtrace;
mod codegen;
mod control;
mod jump;
mod local;
mod masm;
mod result;
mod validator;
mod visitor;
pub mod wasm;

/// Maximum size of a evm bytecode in bytes.
pub const BUFFER_LIMIT: usize = 0x6000;

/// Code generation buffer.
pub type Buffer = SmallVec<[u8; BUFFER_LIMIT]>;