Build a standalone executables from a Julia script
Clone or download
rofinn and dhoegh Minor changes to support julia 0.6 and nightly. (#38)
* Fixed `@*_only` deprecation errors.

* Tried to fix `jl_show` error on nightly.

* Drop 0.4 support?
Latest commit 7da95d8 May 15, 2017


Build Status Build status

Builds an executable that doesn't require any julia source code. The user needs to provide a julia script that contains a function main(), taking no argument, which will be run when executing the produced executable. An executable can be produced by using the build_executable function

using BuildExecutable
build_executable(exename, script, targetdir, "native")

Note on packages:

Even if the script contains using statements, exported functions will not be available in main(). Full qualification of names is required. It's suggested to replace using statements with import statements to produce a consistent result between running main() in the REPL and running the executable.

If packages with binary dependencies is used the produced executable will not function properly.

Note on portability

The executable produced by build_executable is known to be portable across Windows computers, and OS X, but not on Linux. To increase the portablity use an older cpu_target target as "core2" instead of "native".