-
Notifications
You must be signed in to change notification settings - Fork 14
Home
Welcome to the Clue documentation.
This wiki documents all changes from Lua and additions that Clue has.
It will also assume that you already know Lua and will not explain Lua itself.
For a general introduction on Clue itself, read the readme.
- Paste and run this command in the console:
cargo install clue
- Type
clue
in the console to run the compiler, it will explain the rest
Clue supports extra features that can be toggled when installing:
-
interpreter
: adds the--execute
flag to let Clue run the generated output using mlua -
rpmalloc
: uses rpmalloc to improve performance, not available on all platforms
By default Clue enables both features.
These can be downloaded in the latest release.
- .deb
sudo dpkg -i clue_<version>_<arch>.deb
- .rpm
sudo rpm -i clue-<version>.<arch>.rpm
Using the AUR
- With paru
paru -S clue
- With yay
yay -S clue
- With makepkg
git clone https://aur.archlinux.org/clue.git
cd clue
makepkg -si
- Download the latest release and save it somewhere
- Open your system environment variables
- Add the path to the directory that contains
clue.exe
in the PATH variable - Type
clue
in your cmd/PowerShell to run the compiler, it will explain the rest
- Code blocks are now inside
{}
instead ofthen
/do
/repeat
andend
/until
- Comments are made with
// ...
or/* ... */
Clue will always output a single file: if more .clue files are compiled at once they will be merged together in main.lua
, the output of these files will be stored as functions inside the table _modules
(which should not be edited).
If multiple files are compiled Clue will make the Lua code start from main.clue
, as such that file must be present and it should handle loading the other files.
To load other files (.clue or .lua) you can use the @import
directive, read more about it here