llama
A friendly LLVM library for Rust.
Goals:
- Support the latest
llvm-sysrelease (as of LLVM 14 and llama 0.14.0 the version numbers match) - Provide an improved interface, while still remaining as close as possible to the LLVM C API.
Due to the size of the LLVM API there is bound to be missing, broken or incomplete functionality in llama, please create an issue if something you need isn't implemented.
NOTE: llama will let you generate invalid IR, take a look at inkwell for LLVM bindings with a focus on type-safety
Documentation
Examples
Inkwell's example using llama:
use *;
// Convenience type alias for the `sum` function.
//
// Calling this is innately `unsafe` because there's no guarantee it doesn't
// do `unsafe` operations internally.
type SumFunc = unsafe extern "C" fn ;