fyne-io / fyne-cross

Cross compiler tool for Fyne apps
BSD 3-Clause "New" or "Revised" License
247 stars 50 forks source link

Ability to use locally installed zig for supported targets #184

Open Jacalz opened 1 year ago

Jacalz commented 1 year ago

Checklist

Is your feature request related to a problem?

Downloading docker images can be both be slow and take up storage space. For most devices this is not a huge issue but we might be able to save some of this time and space by using a locally installed version of zig. If we are compiling for a target that do not requite extra libraries and such, we should be able to use a local version of zig if available.

Is it possible to construct a solution with the existing API?

It might be a bit complicated with which targets (os/arch) are possible to compile to without needing the docker containers but should be doable otherwise.

Describe the solution you'd like to see.

If the user has the zig binary in their path, we can add an option to avoid downloading the docker image for some platforms if there is no extra libraries besides Zig are needed for the compile.

Bluebugs commented 1 year ago

It is to be noted that zig is not yet providing a stable release and we had to pick the right version for the right OS so far. It will improve over time, but this might be something to roll only when we are confident that the version of zig we will rely on won't break.

Jacalz commented 1 year ago

I think I opened this in the wrong place because I had intended of opening this in fyne-cross but I realized that this kind of makes sense her as well. Should I transfer it or keep it here?

Bluebugs commented 1 year ago

I think there is two things to do. One in fyne cli to adapt cgo parameters when using zig and one in fyne cross to try to pick the local host zig. We could update this one to address the first problem and open another task in fyne cross to cover the second problem.

andydotxyz commented 1 year ago

I agree there are two - but this sounds very much like what belongs in fyne-cross and we can add a new issue for fyne if desired