A modern rebar3 plugin for LFE projects
- 🚀 Fast: Incremental compilation is 10-30x faster than full rebuilds
- 🎯 Correct: Header changes automatically trigger recompilation
- 🛡️ Reliable: >90% test coverage, tested on Erlang/OTP 24-28
- 📦 Powerful: Nested module packages with proper cleanup
- 💬 Clear: Professional error messages that help you fix issues
- 🔧 Modern: Uses rebar3's latest compiler infrastructure
%% rebar.config
{plugins, [
{rebar3_lfe, "0.5.0"}
]}.
{deps, [
{lfe, "2.2.0"}
]}.rebar3 lfe compile # Compile your code
rebar3 lfe repl # Start REPL
rebar3 lfe eval '(+ 1 2 3)' # Evaluate LFE expressions
rebar3 lfe ltest # Run tests$ rebar3 lfe compile
Compiling 10 LFE files...
Progress: 10/10 (100%)
Compiled 10 files in 1.25s
$ touch include/records.lfe
$ rebar3 lfe compile
Compiling 3 LFE files... # Only files using the header
Compiled 3 files in 0.3sREPL support in rebar3_lfe has changed slightly in 0.5.0:
- Easier support for customising the LFE REPL prompt
rlwrapfor most consistent experience with readline support (dedicated LFE history file, etc.)
There is a new Makefile target that is included with all generated projects (rebar3 new lfe-*) which makes it easy for projects to use rlwrap and prompt customisations:
make repl
Autocompletion support is current in progress; when complete, example usage will be shown here.
Optional!
Organize your code by directories:
src/
├── myapp.lfe → myapp module
└── myapp/
├── core.lfe → myapp.core module
└── utils/
└── helpers.lfe → myapp.utils.helpers module
src/myapp.lfe:10: error: undefined function foo/1
Did you mean: bar/1?
Core:
compile- Smart, incremental compilationclean- Remove build artifactsrepl- Interactive LFE shelleval- Evaluate LFE expressionsltest- Run testsversions- Version information
Scripts & Escripts:
run- Execute LFE scripts (main/1)escriptize- Build standalone executablesrun-escript- Execute built escripts
Releases:
release- Build OTP releasesrun-release- Manage releases (start/stop/console/etc)
Utilities:
confabulate- Convert LFE data to Erlang format
- Quick Start - Get started in 5 minutes
- Commands - Complete command reference
- Troubleshooting - Common issues
- Migration Guide - Upgrade from 0.4.x
- Simple Library - Basic LFE library
| Erlang/OTP | rebar3 | r3lfe | Status |
|---|---|---|---|
| 28 | 3.25 | 0.5.0 | ✅ Tested |
| 27 | 3.25 | 0.5.0 | ✅ Tested |
| 26 | 3.25 | 0.5.0 | ✅ Tested |
| 25 | 3.22 | 0.5.0 | ✅ Tested |
| 24 | 3.22 | 0.5.0 | ✅ Tested |
Version 0.5.0 is a complete rewrite with breaking changes:
- Module prefix:
rebar3_lfe_*→r3lfe_* - Faster, more reliable compilation
- Better error messages
See contributing.
git clone https://github.com/lfe/rebar3.git rebar3_lfe
cd rebar3_lfe
rebar3 compile
make check- Documentation: lfe.github.io/rebar3
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Chat:
#toolingin LFE Discord
Apache 2.0 - See LICENSE
