-
How does nelua's cache compilation works |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
When you run
When you compile the Nelua source code the current All this means the only purpose of the current cache system is to skip C recompilation between runs in case no source code changed. Yet for all runs the compiler analyze the entire Nelua source code being run, maybe in the future this may be improved with some kind of incremental compilation system to speed up compilation of large Nelua code bases. |
Beta Was this translation helpful? Give feedback.
When you run
nelua main.nelua
, the compiler saves in the user cache directory (usually located at$HOME/.cache/nelua/
) the following files:$HOME/.cache/nelua/main.c
file, this is the representation of the whole program Nelua in C source$HOME/.cache/nelua/main
file (with.exe
suffix on Windows), this is the binary of the whole program compiled to native machine executable.When you compile the Nelua source code the current
$HOME/.cache/nelua/main.c
is read and compared with a new generated C file, in case both are the same (due to no source code changes) then the Nelua will skip invoking the C compiler, and simply run$HOME/.cache/nelua/main
directly in case it exists. Otherwise, in ca…