• Stars
    star
    157
  • Rank 237,067 (Top 5 %)
  • Language
    Julia
  • License
    Other
  • Created almost 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build a standalone executables from a Julia script

BuildExecutable

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".