Roadmap
From Reia
- This page documents the long-term Reia roadmap. For short-term milestones, see Reia milestones on Lighthouse.
The First Milestone: Compile to Erlang forms
Reia presently targets the Erlang VM by compiling directly to Erlang forms. This allows the existing Erlang compilers to produce both BEAM bytecode and native code through the HiPE compiler.
There's an upside and a downside to compiling Reia to Erlang forms. The obvious upside is that there are a number of tools available for working on Erlang forms directly, namely the existing Erlang evaluator and Erlang compilers which are the best tools for leveraging Erlang's VM. Also, using Erlang forms avoids dealing directly with BEAM internals, greatly simplifying the whole exercise.
The downside is that Reia is conceptually different from Erlang to the point that targeting Erlang forms directly makes it much slower than it could be.
Why not Core Erlang?
The Erlang compiler supports a reduced subset of Erlang called Core Erlang which is ideal as a compile target for languages wishing to run on BEAM. However, Erlang does not provide a facility for evaluating Core Erlang, instead it must be compiled, loaded into the code server, and executed.
As a scripting language, Reia makes extensive use of evaluation. This comes in many forms: an interactive interpreter with a read-eval-print loop, a command line program for evaluating Reia, and string eval built-in as a core language feature.
There are possible resolutions to this: Reia's compiler could target both Erlang forms and Core Erlang. Reia could implement its own eval for its own forms in a similar fashion to erl_eval.
For the time being, Reia will continue to target to Erlang forms until an eval solution can be found.
The Second Milestone: Compile directly to BEAM bytecode
Reia can already compile to BEAM bytecode by first compiling to Erlang forms. However, Reia's performance can be improved by compiling directly to BEAM bytecode. This approach will forgo the existing Erlang compiler toolchain and is thus much more complex. This approach is a significant undertaking, but will provide the most performant means for Reia to leverage the existing Erlang infrastructure.

