| title | layout |
|---|---|
Contributing |
page.njk |
If you want to fix a bug or implement a feature in the Lucy compiler, that should be done in the liblucy project.
Most development can be done using the lucyc CLI. You can build just this binary using make bin/lucyc. Below is instructions on building liblucy.
liblucy has 2 compilation targets:
- The CLI,
lucyc(Lucy compiler) which is a native binary. - Wasm, which has development and release versions. These can be loaded and used in Node.js, Deno, or in the browser.
Note that building on Windows is not currently possible. We would love someone to contribute this!
- A C compiler: If you are using a Mac you should install the XCode command line tools which gives you Clang. If you are on Linux you can install GCC.
- Emscripten: If you are only going to build the CLI you can skip this one. Emscripten is used to build to wasm.
- jq
- sed: If on Mac you need gsed.
You can build just the CLI by running:
make bin/lucycThe lucyc command will be in bin/lucyc.
The wasm binaries are built in 4 forms:
- dist/liblucy-debug-browser.mjs
- dist/liblucy-debug-node.mjs
- dist/liblucy-release-browser.mjs
- dist/liblucy-release-node.mjs
You can build any of these with make, such as:
make dist/liblucy-debug-browser.mjsThe release versions are built using -O3.
Each of these has a separate entrypoint in liblucy, such as main-browser-dev.js. When someone imports liblucy in Node this is controlled with the package.json exports field.
You can build all of the binaries using:
make all