Installation
Installation
Larecs🌲 is written in and for Mojo🔥, which needs to be installed in order to compile, test, or use the software. You can build Larecs🌲 as a package as follows:
- Clone the repository / download the files.
- Navigate to the
src/
subfolder. - Execute
mojo package larecs
. - Move the newly created file
larecs.mojopkg
to your project’s source directory.
Include the source directly when compiling
Instead of building Larecs🌲 as a package, you can also include its source code directly when running or compiling your own project. This has the advantage that you can access the source while debugging and adjusting the Larecs🌲 source code. You can include the Larecs🌲 source code as follows:
mojo run -I "path/to/larecs/src" example.mojo
Include Larecs🌲 in VSCode and its language server
To let VSCode and its language server know of Larecs🌲 (so that Ctrl-Click, mouse hover docs, autocomplete and error checking are available), include the package as follows:
- Go to VSCode’s
File -> Preferences -> Settings
page. - Go to the
Extensions -> Mojo
section. - Look for the setting
Lsp: Include Dirs
. - Click on
add item
and insert the path to thesrc/
subdirectory.