]>
description | Little lambdas eat ivy. |
last change | Sun, 7 Feb 2021 08:30:08 +0000 (03:30 -0500) |
URL | https://git.witchoflight.com/ivy |
Ivy is an impure functional language that compiles to native code. It was developed as an educational project to learn more about compiling functional languages, and compiling without going through frameworks like LLVM that handle the backend. It currently supports x64, and requires clang as an assembler.
Running the compiler requires the Ivy runtime be on the linker search path. Build the runtime:
$ cd rt
$ cargo build --release
And then you can either install rt/target/release/libivy_rt.a
in your library
directory of choice, or run the compiler in the Ivy project root directory via:
$ env LIBRARY_PATH=rt/target/release cargo run --release
As a shortcut for running a program, you can use tools/run.py
which will
compile and run a source file directly (handling the library path for you),
while simultaneously doing pretty-printing of debug output.
To get pretty-printed debug output on a compiled binary, use tools/trace.py
to run it.
You can use tools/test.py
to run all of the project tests. It will ensure
that the compiler and runtime are properly built before running any filetests.
Filetests are written to be run by tools/lit.py
, and checked with
filecheck
. See filetests in the tests/
directory for examples.
Recommended .git/hooks/pre-commit
script:
#!/bin/bash
set -e
tools/test.py
3 years ago | develop | shortlog | log | tree |