jit_rs

Crates.iojit_rs
lib.rsjit_rs
version0.1.3
sourcesrc
created_at2021-07-02 08:45:31.299959
updated_at2021-07-02 13:34:37.18232
descriptionjit.rs is a library for generating, optimizing and running executable code at runtime
homepagehttps://crates.io/crates/jit_rs/
repositoryhttps://github.com/serid/jit.rs
max_upload_size
id417727
size7,898
(serid)

documentation

https://docs.rs/jit_rs/

README

jit.rs

jit.rs is a library for generating, optimizing and running executable code at runtime.

fn main() {
    // Machine code that returns int value 13
    let bytes = [0xb8, 0x0d, 0x00, 0x00, 0x00, 0xc3];

    // Execute code stored in `bytes`
    let r = unsafe { jit_rs::execute_bytes::<i32>(&bytes) };

    // Prints 13
    println!("Hello, world! {}", r);
}
Commit count: 7

cargo fmt