Element 0
[](https://github.com/Element0Lang/element-0/actions/workflows/tests.yml)
[](https://Element0Lang.github.io/element-0/)
[](https://github.com/Element0Lang/element-0/tree/main/examples)
[](https://github.com/Element0Lang/element-0/blob/main/LICENSE)
[](https://ziglang.org/download/)
[](https://github.com/Element0Lang/element-0/releases/latest)
A small embeddable Lisp for the Zig ecosystem λ
---
Element 0 programming language is a new Lisp dialect inspired by Scheme.
It aims to be compliant with the [R5RS](https://conservatory.scheme.org/schemers/Documents/Standards/R5RS/) standard to a good degree,
but not limited to it.
This project provides a bytecode compiler and virtual machine for the Element 0 language, written in Zig.
The implementation is named Elz (pronounced "el-zee") and can be integrated into Zig applications as a scripting engine.
In addition, Elz comes with a read-eval-print loop (REPL) for interactive development and testing, and
it can easily be extended using Zig code via the foreign function interface (FFI) or Element 0 code.
### Why Element 0?
Having an embeddable scripting language is useful in a Zig project.
For example, you can write the core parts of your application in Zig for performance.
Then you can write features like plugins or configuration files in Element 0.
This lets you change parts of your application without the need to recompile the entire project.
### Key Features
* A good level of R5RS compliance with a growing standard library (see [std.elz](src/stdlib/std.elz))
* Easy to integrate into Zig projects as a lightweight scripting engine (with a VM)
* Easy to extend with Zig functions via the use of FFI or writing Element 0 code
* Prepacked with a REPL (for interactive development)
See the [ROADMAP.md](ROADMAP.md) for the list of implemented and planned features.
> [!IMPORTANT]
> This project is in early development, so bugs and breaking changes are expected.
> Please use the [issue page](https://github.com/Element0Lang/element-0/issues) to report bugs or request features.
---
### Getting Started
#### Using the Standalone REPL
##### A. Download Release Binaries
You can download the release binaries for Elz from the [release page](https://github.com/Element0Lang/element-0/releases).
##### B. Building from Source
1. Clone the repository
```sh
git clone https://github.com/Element0Lang/element-0.git
cd element-0
```
2. Build and run the REPL
```sh
zig build repl && ./zig-out/bin/elz-repl
```
3. Run an Element 0 script file
```sh
./zig-out/bin/elz-repl --file examples/elz/e13-hello-world.elz
```
#### Embedding Elz in Zig Projects
You can add Elz to your project as a dependency and use it as a scripting engine.
##### Installation
Run the following command in the root directory of your project to add Elz as a dependency.
```sh
zig fetch --save=elz "https://github.com/Element0Lang/element-0/archive/