A libary to generate x86-64Bit machine code
Error: Jit dosn't work Warning: this libary is currently undergoing big changes so don't use in production
use CodeGenLib::{Builder, BinaryFormat};
pub fn main() -> Result<(), Box<dyn std::error::Error>>{
let mut builder = Builder::new();
let func = builder.function(
"call",
vec![
Call("callme"),
Return(5),
]);
builder.build("test.o", BinaryFormat::Elf)?;
Ok(())
}
Check out our documentation on https://docs.rs/CodeGenLib/latest/CodeGenLib/
Copyright (C) 2024 Cr0a3
(!) Uses the faerie crate (https://crates.io/crates/faerie)