JuliaLang / PackageCompiler.jl

Compile your Julia Package
https://julialang.github.io/PackageCompiler.jl/dev/
MIT License
1.4k stars 186 forks source link

Best practices for cross-platform relocatable app? #879

Open biona001 opened 9 months ago

biona001 commented 9 months ago

I tried posting on discourse but its not getting any attention, so I'm posting here to hopefully get more response.

Using PackageCompiler.jl I created a relocatable app, which seems to be portable to other machines running the same operating system. But I have 2 questions:

  1. How can I compile binaries for every operating system that Julia supports? For example, windows, mac (intel), mac (apple silicon), linux (x86), linux(arm)…etc. What is the best practice here?
  2. The resulting binaries are pretty large (~700MB when zipped). If I compile 10 of these, one for each architecture, what is the best practice to distribute them?

Any suggestion would be highly appreciated.

sloede commented 9 months ago

I'm sorry that you did not get any responses so far. Unfortunately, I cannot really help you out here either, except that I know that this is an important concern. I suspect that at the moment there are just not enough users of PC who use it to create apps with the same goal as you (cross-platform apps), and thus there just aren't any best practices available (yet).

If you do find out something that might be of help to others, it would be great if you could document it here eventually, or - even better - create a PR to the PC docs to make your experience easier to find for others in similar situations.

KristofferC commented 9 months ago

You would pretty much have to do the same as Julia itself gets built and distributed:

biona001 commented 9 months ago

I guess I was hoping something like BinaryBuilder.jl would automatically work with PackageCompiler.jl. I'm not sure how that would work though.

Probably I can start a bunch of AWS instances and build each binary manually. If I figure out something more elegant, I will share it here.