Runic.jl: A code formatter with rules set in stone

Runic can now be (statically) compiled with the juliac compiler driver from JuliaLang/julia#55047 :tada: :

  1. Compile the branch from JuliaLang/julia#55047 alternatively get the preview build with juliaup add pr55047 and juliaup default pr55047
  2. Clone the Runic repository
  3. Run make in the juliac subdirectory which compiles the runicc binary
    $ ls -lah runicc
    -rwxrwxr-x 1 fredrik fredrik 2,9M sep  5 14:17 runicc
    

Compiled execution:

$ time ./runicc <../src/Runic.jl >/dev/null

real    0m0,078s
user    0m0,074s
sys     0m0,016s

Regular (precompiled) execution (e.g. julia -e 'using Runic; Runic.main()'):

$ time runic <../src/Runic.jl >/dev/null

real    0m0,328s
user    0m0,314s
sys     0m0,084s

Runic is surprisingly fast even without compiling, but if you use e.g. “format on save” or similar you can sometimes notice a tiny lag for larger files. With the compiled binary you don’t notice it at all.

30 Likes