Skip to content

How does nelua's cache compilation works #176

Answered by edubart
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by edubart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant