# LLVM from Crystal

**URL:** <https://forum.crystal-lang.org/t/llvm-from-crystal/975>\
**Category:** Help & Support\
**Created:** [July 23, 2019, 1:13pm UTC](https://forum.crystal-lang.org/t/llvm-from-crystal/975 "2019-07-23T13:13:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Myersj281](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/myersj281/32/446_2.png) [@Myersj281](https://forum.crystal-lang.org/u/Myersj281)\
**Post date:** [July 23, 2019, 1:13pm UTC](https://forum.crystal-lang.org/t/llvm-from-crystal/975/1 "2019-07-23T13:13:45Z")

</div>

I’m trying to use LLVM from Crystal but when I search via google all I can find is info on Crystal’s own use of LLVM. Are there any ways to use LLVM from Crystal? A shard I can install maybe?

EDIT: Or is a C binding the only possiblity?

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [July 23, 2019, 1:28pm UTC](https://forum.crystal-lang.org/t/llvm-from-crystal/975/2 "2019-07-23T13:28:43Z")

</div>

Check [https://crystal-lang.org/api/0.29.0/LLVM.html](https://crystal-lang.org/api/0.29.0/LLVM.html)

It’s not documented at all because we wrote the bindings/wrappers as we wrote the compiler and only for the compiler without expecting others to use it. Plus the API is more or less that of LLVM C API but with a more object-oriented API.

There’s also an example [here](https://github.com/crystal-lang/crystal/blob/master/samples/llvm/brainfuck.cr) and LLVM is used in the codegen part of the compiler’s source code.
