Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/llvm-hs/llvm-hs-examples
Examples for Haskell bindings to LLVM
https://github.com/llvm-hs/llvm-hs-examples
jit llvm llvm-hs
Last synced: 3 months ago
JSON representation
Examples for Haskell bindings to LLVM
- Host: GitHub
- URL: https://github.com/llvm-hs/llvm-hs-examples
- Owner: llvm-hs
- License: mit
- Created: 2017-01-08T11:55:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-06-01T20:02:56.000Z (over 3 years ago)
- Last Synced: 2023-08-21T19:57:53.350Z (over 1 year ago)
- Topics: jit, llvm, llvm-hs
- Language: Haskell
- Homepage:
- Size: 49.8 KB
- Stars: 64
- Watchers: 12
- Forks: 20
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
LLVM Haskell Examples
=====================[![Build Status](https://travis-ci.org/llvm-hs/llvm-hs-examples.svg?branch=master)](https://travis-ci.org/llvm-hs/llvm-hs-examples)
Simple examples demonstrating the usage of the
[llvm-hs](https://github.com/llvm-hs/llvm-hs) for generating and manipulating
LLVM from Haskell.* [basic](./basic) - Generating LLVM AST and rendering Textual IR
* [orc](./orc) - JIT Compiling IR on the Eager and Lazy ORC Jit using Compile-On-Demand
* [arith](./arith) - a minimal JIT compiler for functions of one (real) variable using recursion schemes
* [irbuilder](./irbuilder) - Basic usage of the LLVM IRBuilder for constructing modulesThese examples require LLVM 9.0. Check that your installed LLVM version is
precisely 9.0. If not then follow the install directions in the
[llvm-hs](https://github.com/llvm-hs/llvm-hs) repository.```bash
$ llvm-config --version
9.0
```To run the examples with Stack:
```bash
$ stack exec basic
$ stack exec orc
$ stack exec arith
$ stack exec irbuilder
```To load the examples in GHCI:
```bash
$ stack repl examples:basic
$ stack repl examples:orc
$ stack repl examples:arith
$ stack repl examples:irbuilder
```To run the examples with Cabal:
```bash
$ cabal run basic
$ cabal run orc
$ cabal run arith
$ cabal run irbuilder
```License
-------MIT License
Copyright (c) 2017-2020, Stephen Diehl