Crates.io | CodeGenLib |
lib.rs | CodeGenLib |
version | 0.0.1 |
source | src |
created_at | 2024-03-31 18:53:14.196861 |
updated_at | 2024-03-31 18:53:14.196861 |
description | A libary to generate x86-64Bit machine code (like LLVM) |
homepage | |
repository | |
max_upload_size | |
id | 1191839 |
size | 110,274 |
A libary to generate x86-64Bit machine code
Error: Jit dosn't work
use CodeGenLib::{Builder, ArtifactError};
pub fn main() -> Result<(), ArtifactError>{
let mut builder = Builder::new();
builder.add_function("call")
.call("callme")
.ret_int(5);
builder.build("test.o")?;
Ok(())
}
Check out our documentation on https://docs.rs/CodeGenLib
Copyright (C) 2024 Cr0a3
(!) Uses the faerie crate (https://crates.io/crates/faerie)