Are there any plans for implementing an ahead-of-time-compiler in Julia that can generate standalone executables?
I believe such a feature would attract a very large set of new (system) programmers typically programming in system languages such as C, C++, D, Zig, Rust and Go.
5 Likes
Is this really stable!!!?
People are asking for an AOT-compiler for version 1.x of Julia.
1 Like
Should
Pkg.add("PackageCompiler")
work? It fails for me as
Resolving package versions...
Installed SnoopCompile ββββ v0.2.0
Installed LibCURL βββββββββ v0.3.1
Installed LibExpat ββββββββ v0.5.0
Installed PackageCompiler β v0.4.0
Installed HTTPClient ββββββ v0.2.1
Installed Libz ββββββββββββ v1.0.0
Installed BufferedStreams β v1.0.0
Installed ArgParse ββββββββ v0.6.0
Installed WinRPM ββββββββββ v0.4.0
Installed TextWrap ββββββββ v0.3.0
Updating `~/.julia/environments/v1.0/Project.toml`
[9b87118b] + PackageCompiler v0.4.0
Updating `~/.julia/environments/v1.0/Manifest.toml`
[c7e460c6] + ArgParse v0.6.0
[e1450e63] + BufferedStreams v1.0.0
[0862f596] + HTTPClient v0.2.1
[b27032c2] + LibCURL v0.3.1
[522f3ed2] + LibExpat v0.5.0
[2ec943e9] + Libz v1.0.0
[9b87118b] + PackageCompiler v0.4.0
[aa65fe97] + SnoopCompile v0.2.0
[b718987f] + TextWrap v0.3.0
[c17dfb99] + WinRPM v0.4.0
Building LibCURL βββββββββ `~/.julia/packages/LibCURL/Qs5og/deps/build.log`
Building WinRPM ββββββββββ `~/.julia/packages/WinRPM/rDDZz/deps/build.log`
Building PackageCompiler β `~/.julia/packages/PackageCompiler/5u3Km/deps/build.log`
β Error: Error building `PackageCompiler`:
β ERROR: LoadError: syntax: try without catch or finally
β Stacktrace:
β [1] include at ./boot.jl:317 [inlined]
β [2] include_relative(::Module, ::String) at ./loading.jl:1038
β [3] include(::Module, ::String) at ./sysimg.jl:29
β [4] include(::String) at ./client.jl:388
β [5] top-level scope at none:0
β in expression starting at /home/per/.julia/packages/PackageCompiler/5u3Km/deps/build.jl:4
β @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068
On Julia 1.0.
I wouldnβt necessarily call it stable (it does have a major version number of β0β), but itβs worked for me on a wide variety of use-cases for 0.6. My guess for why itβs failing to build is that it isnβt yet compatible with 1.0. If youβd like to try to help with fixing that, Iβd recommend downloading 0.7 and fixing any warnings generated by PackageCompiler.
3 Likes
This has seen massive improvements in the last two years. PackageCompiler was rewritten from the ground up. See Kristoffer Carlssonβs talk at this yearβs juliacon for an overview of the current state of PackageCompiler:
5 Likes