andy-hanson / crow

Crow programming language
https://crow-lang.org
Other
17 stars 1 forks source link

Gitter

Crow

This readme describes how to build Crow from source.

For information about the language itself, visit the website.

Setup

To work on Crow, you'll need these tools:

Then run:

git clone https://github.com/andy-hanson/crow.git
cd crow
make test

This will build bin/crow (or bin\crow.exe on Windows), test, then serve the website on localhost.

You can also speed up builds by passing -j4 (e.g. make all -j4), but it makes the output harder to read.

Testing

make test runs all tests.

There are 2 kinds of tests:

Before any pull request, you should also run make all. This tests, lints, and starts serving the website. Run the demo on the site to manually verify that WASM is still working.

Debugging

Debugging crow itself (compiler or interpreter)

Use make debug.

Debugging Crow code

Currently, Crow has no debugger of its own, so you'll have to compile to C and debug that. By default, crow compiles the C code with debug symbols.

For example:

crow build a.crow
gdb a
rbreak throw
run

Building with libgccjit

Run make all JIT=1 to build with libgccjit support. Use crow run demo/hello.crow --jit to test it out.

Publishing

Run make upload-site to build and publish. This requires you to have aws installed. You need to do this on both Linux and Windows. (Windows uploads crow-windows-x64.tar.xz and crow-demo-windows.tar.xz, Linux handles everything else.)