LLVM libraries
In-tree bindings
- C++
- C
- Not object-oriented
- Generate/parse (C++ API)
- Stable API
- OCaml
- Python
- Go
(removed)
- Development has moved out of tree to TinyGo
3rd-party bindings
- Inkwell (Rust)
- Safe types
- Generate/parse (C API)
- llvm-ir (Rust)
- Safe types;
Instruction
is an enum (i.e., safer than Inkwell)
- Parse (C API)
- Inspired by llvm-hs-pure and llvm-hs
- llvm-hs (Haskell)
- Safe types
- Generate/parse (C and C++ API) and pure-Haskell structures with
bidirectional conversions to/from LLVM types
- Docs
- llir/llvm and
llir/irutil (Go)
- Safe types
- Generate/parse (textual LLVM IR)
- Blog post
- TinyGo go-llvm (Go)
- Safe, but not ergonomic types (same issues as C++ API)
- Generate/parse (C API)
- Uses system-installed LLVM
- Backports features from C++ API