Announcing a Fyne GUI toolkit

1,821 views
Skip to first unread message

Andrew Williams

unread,
Sep 14, 2018, 1:17:00 PM9/14/18
to golang-nuts
Hi,

Some time ago I realised that Go was a great language for building new applications, as I wanted to use something powerful but fast to learn. I also wanted a really simple to use GUI toolkit that worked cross platform - this was a little more difficult to satisfy!

The aim was to create an API that was:
  • Simple to learn
  • Great looking with theme options
  • Truly cross platform with identical look across platforms
  • Solved all of the complicated GUI challenges (threading, scaling etc)
And so the Fyne project was created https://github.com/fyne-io/fyne !
The design language is basically material design and the rendering is currently EFL with support for Windows, macOS and Linux.
It's entirely vector based (though you can draw a Raster space if you need) and scales beautifully.

For a taste of what that looks like here you go :)

widgets-dark.png


It's now well into development and ready for people to get involved. There is a long way to go but it feels like a solid base.
Instructions for getting started, if you need them, are at https://github.com/fyne-io/bootstrap/blob/master/README.md .
If you want to know more we're also in the #fyne channel on the gopher Slack server.

Thanks in advance for your thoughts :)
Andrew

Ian Davis

unread,
Sep 14, 2018, 1:57:14 PM9/14/18
to golan...@googlegroups.com

On Fri, 14 Sep 2018, at 6:02 PM, Andrew Williams wrote:

It's now well into development and ready for people to get involved. There is a long way to go but it feels like a solid base.
Instructions for getting started, if you need them, are at https://github.com/fyne-io/bootstrap/blob/master/README.md .
If you want to know more we're also in the #fyne channel on the gopher Slack server.

This looks very impressive.

Is it possible to interface it with opengl or vulcan?

Andrew Williams

unread,
Sep 14, 2018, 3:01:37 PM9/14/18
to golang-nuts
Hi,

Thanks. There is an efl opengl driver which we could utilise instead of the sofware driver with a small change - if your hardware supports it.
It would also be possible to provide an alternative driver that communicates directly with opengl, but this is a lot more work.
I have designed the backend to be loosely coupled so that other options could be provided (i.e. we could write a webgl/webasm driver or a native mobile one). I am writing up documentation about the requirements for drivers but it is basically a canvas that can draw line/rect/text/images(including svg) and some basic window handling.

Current drivers are "desktop" which uses EFL and "test" used for in-memory unit testing of the widgets etc.

I hope that helps,
Andrew

Fino

unread,
Sep 17, 2018, 7:35:17 AM9/17/18
to golang-nuts
great work!

the design looks quite modern!

put into my save list for Go GUI topic,

BR fino

Andy Williams

unread,
Sep 17, 2018, 4:25:24 PM9/17/18
to golang-nuts
Hi,

I don’t know if it helps but I wrote a short document about the driver in Fyne.

Andrew
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tharaneedharan Vilwanathan

unread,
Sep 17, 2018, 5:04:43 PM9/17/18
to an...@andywilliams.me, golang-nuts
Hi,

Anyone having trouble installing on a Mac or am I alone?

The bootstrapping part gives me trouble. Please let me know if I need to provide more details.

Regards
dharani

Justin Israel

unread,
Sep 17, 2018, 5:45:19 PM9/17/18
to vdha...@gmail.com, an...@andywilliams.me, golang-nuts
I've hit a couple issues with the bootstrap on ubuntu 16.04 and have been logging them as I find them:
https://github.com/fyne-io/bootstrap/issues

Andrew Williams

unread,
Sep 17, 2018, 5:49:30 PM9/17/18
to Tharaneedharan Vilwanathan, golang-nuts
Hi,

If you don’t have homebrew installed already it won’t work. Please feel free to contact me off list with details, or raise a ticket.

Apologies for the trouble,
Andy
--

Andrew Williams

unread,
Sep 17, 2018, 5:51:21 PM9/17/18
to Justin Israel, golang-nuts, vdha...@gmail.com
Thanks for tracking it. I had trouble with Ubuntu before, I think the packages change a lot. I will get a VM up and running and check it out.

Andy

R Srinivasan

unread,
Oct 6, 2018, 6:41:21 AM10/6/18
to golang-nuts
1. What are the "distribution" considerations?

    Considering Windows targets - can we have all the required libraries bundled in the final executable? 

2. Can the apps be cross built? i.e. Built on Linux for macOS and windows`targets?

thanks for pointers, srini

soun...@congotech.com

unread,
Oct 8, 2018, 11:21:14 AM10/8/18
to golang-nuts
Hi There,

I tried it to test it.

But i am getting the below error :

# pkg-config --cflags  -- eina evas ecore-evas ecore-evas ecore-input ecore ecore-evas eina evas ecore-evas ecore-input ecore evas ecore ecore-evas ecore-input evas
Package eina was not found in the pkg-config search path.
Perhaps you should add the directory containing `eina.pc'
to the PKG_CONFIG_PATH environment variable
No package 'eina' found


what path should be exported to PKG_CONFIG_PATH?

Thank u

c...@ctis.me

unread,
Oct 8, 2018, 9:43:05 PM10/8/18
to golang-nuts
Just wanted to drop in and say that I'm very impressed with the design and quality of the examples I've seen.

Great work, and thanks for sharing!

Andrew Williams

unread,
Oct 11, 2018, 3:54:29 PM10/11/18
to R Srinivasan, golang-nuts
Hi,

Great questions, thanks!

1. We can bundle in the libraries for Windows and for macOS - but on linux probably not (unless your app is LGPL/GPL due to a licensing issue that I have not found a better solution to). But distribution on Linux it is normal to depend on external libraries :).
There will be a tool included to package final binaries, but I have not got it to a satisfactory level to share yet.

2. Yes, we should be able to do cross-compilation using the standard Go tools. There is the usual challenge of enabling CGO for a GOOS build, but beyond that it should be OK. It's easier than, for example, andlabs UI as we are not linking to OS specific functionality, just the libefl abstraction.

Point 2 may change over time - as we may wish to add certain OS abstraction directly which may make cross compilaton harder.

What I was thinking about, however, was creating some app metadata format and a centralised build server to work around both build and package distribution issues...

I hope that helps,
Andrew
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Williams

unread,
Oct 11, 2018, 3:56:20 PM10/11/18
to soun...@congotech.com, golang-nuts
Hi,

As the Fyne toolkit depends on EFL you need to either install that yourself or use our bootstrap tool[1]. If you have done one or other of those then the error you are seeing is strange, I can try to help you off-list (if so please provide info about OS etc).

I am trying to find ways to provide more helpful errors when the native deps cannot be found...!

Andrew

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Williams

unread,
Oct 11, 2018, 3:57:43 PM10/11/18
to c...@ctis.me, golang-nuts
Hi,

Many thanks for that feedback! We have a long way to go for a full toolkit but it's close to supporting basic applications.
Being designed for the Go language makes it so much quicker and easier to develop with than other possible toolkit choices - and I'm not just saying that from a biased point of view :)

Thanks,
Andrew

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

R Srinivasan

unread,
Oct 11, 2018, 8:54:17 PM10/11/18
to golang-nuts
Thanks a bunch. I will give a serious "go".

Background - a tool that is command line now. Developed on Linux but typical user in Windows. Just cross built for windows. Want to add a minimal frontend - simple dialog. Being like a calculator - don't want to have elaborate "install" procedures. In the case of the cli - one .exe is all it takes. 

will experiment and report back.

srini

Andrew Williams

unread,
Oct 12, 2018, 6:02:32 PM10/12/18
to golang-nuts, R Srinivasan
Hi,

Ah I see what you mean. The cross compiled windows file will rely on the efl library, but that can be packaged. This means that it would need to be a bigger distribution than just the exe if you want all deps shipped (I’m not too familiar with the windows terms yet).

I’ll try and get a document up about distribution which can explain better and be kept up to date.

Thanks,
Andrew

Andrew Williams

unread,
Dec 30, 2018, 5:19:26 PM12/30/18
to golang-nuts, R Srinivasan
Hi,

For anyone still interested in this project but held back by the EFL build or runtime dependency then I have good news:
* Our new default driver does not rely on additional libraries * :)

We have moved to an OpenGL driver - using go-gl and glfw so all you need is the system libraries - and nothing for the app users to install.
There are a couple of performance issues that we will be working on but it is currently capable of running all the apps that were written with the previous driver.

I hope this is helpful to some folk - apologies for reviving the old thread.
Andrew

Sebastien Binet

unread,
Dec 31, 2018, 3:14:45 AM12/31/18
to Andrew Williams, golang-nuts, R Srinivasan
Great!
I'll give this a try.
Thanks.

-s

sent from my droid

Mandolyte

unread,
Jan 1, 2019, 9:16:21 AM1/1/19
to golang-nuts
Hey, the thread isn't that old... but have a question since you are in the thick of GUI things: what do you think of Vulkan?

Andrew Williams

unread,
Jan 1, 2019, 6:22:02 PM1/1/19
to golang-nuts, Mandolyte
Hi,

Vulcan looks like an interesting project and could provide an event higher performance rendering for a Fyne driver. Unfortunately support does not seem to be as widespread as OpenGL (and there seem to be some fun driver issues) so my knowledge is currently theoretical.

Thanks,
Andrew


https://andy.xyz
an...@andy.xyz
--

Chris FractalBach

unread,
Jan 2, 2019, 1:11:22 AM1/2/19
to golang-nuts
I've been experimenting with writing games in Go ever since webAssembly came out.

Are games a possible use case for the GUI?

I saw u mention you were working on...


"basically a canvas that can draw line/rect/text/images(including svg) and some basic window handling."

Which sounds like all you'd need for 2d game graphics :D

Andrew Williams

unread,
Jan 2, 2019, 3:46:40 PM1/2/19
to golang-nuts, Chris FractalBach
Absolutely games are possible :)

In our examples repo we have “life”, “bugs”(like mines) and “solitaire”(incomplete).
Maybe one of them will inspire you.

The canvas work is a little less polished than the main widget set but it should be included in our upcoming release. (Warning: circle is currently not showing)

Thanks,
Andrew


https://andy.xyz
an...@andy.xyz
Reply all
Reply to author
Forward
0 new messages