Rfcs: Create safe LLVM bindings

Created on 21 Jan 2015  ·  7Comments  ·  Source: rust-lang/rfcs

Issue by brson
_Saturday Aug 03, 2013 at 23:15 GMT_

_For earlier discussion, see https://github.com/rust-lang/rust/issues/8274_

_This issue was labelled with: A-libs, A-llvm, E-tedious in the Rust repository_


rustc's LLVM bindings are a bit of a hodgepodge. Some abstractions have been added on top of the C bindings, but not consistently. It would be nice to do some serious cleanup here so that rustc is using only safe, high-level bindings.

T-libs

Most helpful comment

Any news on this topic?

All 7 comments

I've started work on safe LLVM bindings recently [1]. The work is in the very beginning (only small part of API is covered). My bindigs use llvm-sys [2] as unsafe bindings (not ones from rustc). Comments and pull requests are welcome. When something lacks in LLVM C API, I add wrappers for it and I have plans to push these wrappers upstream.

[1] https://github.com/jauhien/iron-llvm
[2] https://bitbucket.org/tari/llvm-sys.rs

There are also some other projects that are doing this:

Any news on this topic?

I am working on some rust ideomatic LLVM bindings right now: https://github.com/vaartis/llvm-rs

I am working on Inkwell which is a safe wrapper over llvm-sys. It's still early on, but I've got some neat ideas for providing a more pleasant and type-safe interface. Contributors are welcome :)

Any progress here? 😅

Closing in favor of the tracking issue https://github.com/rust-lang/rust/issues/54892.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

3442853561 picture 3442853561  ·  3Comments

mahkoh picture mahkoh  ·  3Comments

rudolfschmidt picture rudolfschmidt  ·  3Comments

3442853561 picture 3442853561  ·  3Comments

steveklabnik picture steveklabnik  ·  4Comments