TomBebbington / jit.rs

LibJIT wrapper for Rust
http://tombebbington.github.io/jit.rs/jit/index.html
MIT License
59 stars 11 forks source link

Add LLVM as alternate backend #3

Open TomBebbington opened 9 years ago

TomBebbington commented 9 years ago

This would be extremely cool as a feature and as a method of evaluating performance differences. LibJIT and LLVM both have similar APIs when it comes to generating IR and because LibJIT's API is pretty minimal, it shouldn't be too hard to give them both the same API. I can imagine LLVM being put in as a feature, so to enable it you just have to use:

[dependencies.jit]
version = "*"
features = [ "llvm" ]
artemist commented 8 years ago

It may be easiest to take the LLVM bindings from rustc::lib::llvm::llvm