Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Produce a standalone executable from a Julia script?

Tags:

julia

Is it possible to create something like a standalone executable from a Julia script?

By standalone I mean that the executable should be able to run in a system (same OS) without Julia.

like image 520
becko Avatar asked Apr 23 '16 19:04

becko


People also ask

Can Julia code be compiled?

Julia is, in general, a "just-barely-ahead-of-time" compiled language. When you call a function for the first time, Julia compiles it for precisely the types of the arguments given. This can take some time.

Does Julia compile to binary?

Julia is a great language, but since its inception it had one big drawback: it combines the long compilation times of a high performance language like C with the inability to fully cache the compiled code into a binary. This makes Julia feel slow at times, especially when programming graphical applications.

How do you run Julia code?

Running code You can run a Julia file (via Ctrl+F5, which will run whatever Julia file you have open and active), execute Julia commands via the REPL, or even execute a specific block of code from a file you have open.


1 Answers

Many members of the Julia community are interested in this functionality. However, the core Julia developers do not consider this important/urgent (1). Therefore, a few packages have been developed by community members, but they are not very stable/complete (2 & 3).

PackageCompiler seems to be the best option for compiling a static binary currently available.

like image 123
makunha Avatar answered Sep 21 '22 00:09

makunha