https://github.com/markusn/bfer
Brainfuck to LLVM IR compiler written in Erlang
https://github.com/markusn/bfer
brainfuck erlang llvm
Last synced: 7 months ago
JSON representation
Brainfuck to LLVM IR compiler written in Erlang
- Host: GitHub
- URL: https://github.com/markusn/bfer
- Owner: markusn
- License: other
- Created: 2013-08-23T22:59:37.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-01-05T12:57:48.000Z (about 2 years ago)
- Last Synced: 2025-08-22T05:02:16.543Z (7 months ago)
- Topics: brainfuck, erlang, llvm
- Language: Erlang
- Size: 198 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
bfer
==========
[](https://travis-ci.org/markusn/bfer)
[](https://coveralls.io/r/markusn/bfer?branch=master)
Brainfuck to LLVM IR compiler written in Erlang.
## Building
To build as a library to be included in another Erlang project:
```bash
rebar compile
```
To build as a standalone escript:
```bash
rebar compile escriptize
```
## Usage
When using as a library in another Erlang module the main entry point is `bfer_lib:compile/2` which
takes Brainfuck code as a string and returns LLVM IR as a string.
Used as a standalone escript `bfer` can generate native code if llvm and some kind of cc is installed:
```bash
bfer [-o] INPUT.bf OUTPUT
```
Specifying -o "optimizes" the generated LLVM IR.
## Author
Markus Ekholm (markus at botten dot org).
## License
3-clause BSD. For details see `COPYING`.