"Julia program to a standalone executable"
Nov. 5th, 2021 08:38 amLast spring I could not figure out how to make a standalone executable in Julia. Which was not good (this prevented me from submitting an entry to a demo party).
Finally, someone has posted detailed instructions for Windows (likely to work on other platforms, but not tested), and they contain steps that I had no idea about:
www.linkedin.com/pulse/julia-program-standalone-executable-anders-persson/
Finally, someone has posted detailed instructions for Windows (likely to work on other platforms, but not tested), and they contain steps that I had no idea about:
www.linkedin.com/pulse/julia-program-standalone-executable-anders-persson/
no subject
Date: 2021-11-05 12:50 pm (UTC)After the obvious (have Julia and PackageCompiler.jl installed), non-obvious parts start:
1) From the package manager prompt (what you get after typing ])
2) Edit the source file e.g. to have the julia_main function, You need to have the entry point with a name , or otherwise the standalone program will not work. The function also need a return 0 last, otherwise the standalone program will print an error after running, which doesn’t look good 😁
function julia_main() println("Hello World!") return 0 endto be continued
no subject
Date: 2021-11-05 12:56 pm (UTC)using PackageCompiler create_app("helloWorld", "standalone", force=true)4) Invoke Julia like this
You will get a warning about a manifest-file that will be created, but it does not affect the standalone program in any way.
5) Now You can find in the folder
All the files in are required for the prototype to run, so to give away Your program simply Zip the folder and You are done.
Overall, pretty annoying actually. That's not the normally smooth experience I am used to in my Julia workflows.
But at least it's doable (yes, this does seem to be a case of missing documentation, at least as of Spring 2020; I should see if I can/should contribute to fixing this).
no subject
Date: 2021-11-05 01:55 pm (UTC)So it's enough to just
The just prevents you from seeing complaints.
--project[={|@.}] Set as the home project/environment. The default @. option will search through parent directories until a Project.toml or JuliaProject.toml file is found.(From https://docs.julialang.org/en/v1/manual/command-line-options/)
no subject
Date: 2021-11-07 11:23 pm (UTC)https://docs.julialang.org/en/v1/manual/distributed-computing/
https://docs.julialang.org/en/v1/stdlib/Distributed/
*****
( https://www.geeksforgeeks.org/serialization-in-julia/ )
Standard serialization works, at least for nested dictionaries.
no subject
Date: 2021-11-08 06:10 pm (UTC)https://www.meetup.com/Julia-User-Group-Munich/events/281693605/
https://github.com/jpsamaroo/DaggerMeetup
https://github.com/JuliaParallel/Dagger.jl
https://github.com/DhairyaLGandhi/DaggerFlux.jl
no subject
Date: 2021-11-08 06:08 pm (UTC)Reached "559 contributions in the last year" on github (and 200 followers on twitter; 1158 tweets).)
no subject
Date: 2022-06-22 01:27 am (UTC)