Skip to content

Commit 78d1bf2

Browse files
committed
Update README.md
1 parent 901011a commit 78d1bf2

File tree

2 files changed

+20
-28
lines changed

2 files changed

+20
-28
lines changed

README.md

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,25 @@
1-
# core_erlang
2-
Core Erlang compiler implemented in Rust
3-
4-
Pictured below: CFG for `proplists:get_value/3`
5-
![Example CFG](example_cfg.png)
1+
# Eir Project
2+
Erlang compiler and IR implemented in Rust
63

74
## Details
85

9-
Current area of work: NIF generation proof of concept ([niffy](https://github.com/eirproject/niffy))
6+
Current features:
7+
* Unified Thorin based IR representation named Eir
8+
* Erlang frontend
9+
* Core frontend
10+
* Pattern match compilation passes
11+
* Basic optimization and cleanup passes
12+
* Naive interpreter used for testing
1013

1114
The project is split into several crates:
12-
* `eir` - Contains the core IR data structures, validation, printing
13-
* `compiler` - The CORE Erlang -> Eir compiler
14-
* `gen_nif` - Eir -> LLVM backend. Can emit code for both NIFs and WASM, others easily addable.
15-
* `interpreter` - Reference interpreter for Eir
16-
* `pattern-compiler` - Generic implementation of [this paper](https://www.cs.tufts.edu/~nr/cs257/archive/luc-maranget/jun08.pdf). Used by pattern compilation Eir pass.
17-
* `tools` - Various command line utilities. (dot generation, eir text generation)
18-
* `util` - Utilities used by several other crates
19-
* `cps_transform` - Transforms normal Eir to CPS form Eir
20-
21-
Other directories:
22-
* `otp_build` - Scripts for building parts of OTP directly to `.core` files
23-
* `test_data` - Data used for test suites
24-
25-
Current features:
26-
* Compiles Core erlang to Eir (SSA resolving, lambda lifting)
27-
* Pattern match compilation
28-
* Simple optimizations on Eir
29-
* Performs CPS transformation
30-
* Various IR analysis utilities
31-
* Printing of Eir (both textual and dot graph)
32-
* Executes (part of, for now) Eir in reference interpreter
33-
* Generates LLVM IR for compilation into a NIF
15+
* `libeir_ir` - Contains the core Eir IR data structures, validation, printing
16+
* `libeir_syntax_erl` - Frontend for Erlang, lowers to Eir.
17+
* `libeir_syntax_core` - Frontend for Core Erlang, lowers to Eir.
18+
* `libeir_passes` - Compiler passes operating on Eir.
19+
* `libeir_lowerutils` - Utilities for lowering Eir to SSA form.
20+
* `libeir_interpreter` - Naive interpreter for Eir. Used to run OTP test suites.
21+
* `libeir_intern` - Symbol interning. Used by most other crates.
22+
* `libeir_diagnostics` - Source span handling and diagnostics printing.
23+
* `libeir_util` - Kitchen sink of utilities used by other crates.
24+
* `pattern-compiler` - A generic pattern matching tree compiler.
25+
* `tools` - CLI tools used to work with the IR.

example_cfg.png

-294 KB
Binary file not shown.

0 commit comments

Comments
 (0)