PackageCompiler.jl icon indicating copy to clipboard operation
PackageCompiler.jl copied to clipboard

Best practices for cross-platform relocatable app?

Open biona001 opened this issue 2 years ago • 3 comments

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.

biona001 avatar Oct 26 '23 22:10 biona001

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.

sloede avatar Oct 27 '23 04:10 sloede

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

  • Build Julia on those platforms that you want to support
  • Host the output for all these platforms with different download links.

KristofferC avatar Oct 27 '23 06:10 KristofferC

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.

biona001 avatar Oct 27 '23 20:10 biona001