An open API service indexing awesome lists of open source software.

https://github.com/janotlelapin/lea

A toy compiler targeting the JVM
https://github.com/janotlelapin/lea

jvm jvm-bytecode jvm-languages

Last synced: 4 months ago
JSON representation

A toy compiler targeting the JVM

Awesome Lists containing this project

README

          

# Lea

The compiler implemented in Rust for my toy language (Lea), targeting the JVM.

```ts
module Main;

fn main(args: String[]) {
print("Hello, World!");
}
```

## Usage

Download and compile the crate:

```sh
git clone https://github.com/JanotLeLapin/lea
cd lea
cargo build --release
```

Compile and run your program:

```sh
./target/release/leac myleafile.lea
java Main # prints: Hello, World!
```

## Tests

If you have Nix installed on your system, you may run the [unit tests](./test) with `nix run .#tests`.