Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for building native dependencies using zig #174

Open
Bluebugs opened this issue Feb 24, 2023 · 4 comments
Open

Adding support for building native dependencies using zig #174

Bluebugs opened this issue Feb 24, 2023 · 4 comments

Comments

@Bluebugs
Copy link
Contributor

Is your feature request related to a problem? Please describe:

As most of our image are relying on zig to cross compile, and more of them might use it over time, we can potentially leverage zig ability to build native dependencies for project that provide a build.zig file like : 'https://github.com/PCRE2Project/pcre2/blob/master/build.zig' . This would address the request to support building non pure Go dependencies outside of Fyne without the need to build a custom container for the users of fyne-cross.

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

It is currently possible to do so by building custom container that include those dependencies. It is a lot of work and a huge barrier to create complex application.

Describe the solution you'd like to see:

I don't really have a clear idea on how that would work. I would think we need dependencies metadata to indicate which package to get and build. Maybe something to add to the FyneApp.toml.

@gedw99
Copy link

gedw99 commented Mar 13, 2023

Someone else is doing it for a Fyne project too

https://lucor.dev/post/cross-compile-golang-fyne-project-using-zig/

@Jacalz
Copy link
Member

Jacalz commented Mar 13, 2023

@gedw99 Indeed. That's basically what got us started in the direction of moving things over to Zig. Luca (@lucor), who wrote that article, is the original developer of fyne-cross and part of the Fyne team ;)

@Bluebugs
Copy link
Contributor Author

Yes, with @lucor work we are now using zig for fyne-cross starting in version 1.4. The goal of this issues is to look if we can get one step further, compiling native dependencies too. zig support to build code that come with a build.zig file. We could maybe manage to support those package and automatically build them, so that you can use any dependencies easily with fyne-cross.

@gedw99
Copy link

gedw99 commented Mar 14, 2023

Thanks for that.

i am using deno with golang , and deno compile does a similar thing to zig.

Ftom a Mac when you tell it to compile to windows it will pull down the windows OS and ISA binaries to do it. It’s seamless …

Anyways this will be a great feature for Fyne when it rolls out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants