4 个版本
0.1.3 | 2021年7月2日 |
---|---|
0.1.2 | 2021年7月2日 |
0.1.1 | 2021年7月2日 |
0.1.0 | 2021年7月2日 |
967 在 编程语言 中
9KB
108 行
jit.rs
jit.rs
是一个用于在运行时生成、优化和执行可执行代码的库。
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);
}
依赖项
~123MB
~2M SLoC