Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/foodelevator/huginn
A language and compiler
https://github.com/foodelevator/huginn
compiler programming-language
Last synced: 22 days ago
JSON representation
A language and compiler
- Host: GitHub
- URL: https://github.com/foodelevator/huginn
- Owner: foodelevator
- License: mit
- Created: 2022-06-14T18:43:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-16T18:48:00.000Z (over 2 years ago)
- Last Synced: 2024-05-05T15:24:53.890Z (10 months ago)
- Topics: compiler, programming-language
- Language: Rust
- Homepage:
- Size: 182 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# huginn
A hobby project I'm working on when I have time and energy after work.
This is a compiler for a (so far) very simple programming language.
This currently uses
[cranelift](https://github.com/bytecodealliance/wasmtime/tree/main/cranelift)
for code generation.## Quickstart
To run in JIT mode:
```
$ cargo run run src/tests/fibonacci.hg
```To build a static executable:
```
$ cargo run build src/tests/fibonacci.hg
$ ./a.out
```## Example fibonacci implementation
```
main := proc() {
a := 0;
b := 1;
while a <= 55 {
print(a);c := a + b;
a = b;
b = c;
}
};
```