Clixir v0.3.3 Clixir.CodeWriter View Source
This module does the actual work of Clixir.__before_compile__/1
. It writes out
the C and GNU gperf code fragments which later on get combined to form the project’s
clixir
executable.
Due to the nature of the system, re-compilation is mostly unavoidable: if we are called, then apparently the Elixir compiler decided that the Clixir-using module was out of date. We could go all smart and drop a hash over the C code on disk and check whether it was changed, but the executables we generate are small so recompilation is not a big issue. Therefore, we set things up so that recompilations happens rather often instead of trying to avoid it.