Live data from Hacker News

Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

github.com

11–20 of 63 posts

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#11
post #7

Was looking for something like this some years back. Though I wanted Windows support too. Ended up switching to C++ to use wxWidgets, giving me small self contained binaries.

Big fan of WxWindows, I'm just too invested into Go these days. :)

Self-contained Spot "Hello World" is 2.3MiB on my Mac. Not pretty, but works for me.

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#12
post #9
post #6

Cool! What does building for cross platform look like? Would love if there was a command that produced my MacOs .app and Windows exe without me having to dive into package management/containers/signing headaches per platform.

The backends (FLTK/Gocoa) are using CGo, which currently does not support cross-compiling as far as I know. So you still need to have a build pipeline with multiple operating systems, signing/notarization tools, etc. :(

Too bad.

I swear half the electron apps use it for ease of Xplatform build.

I’d love something like this for giving my CLIs UIs.

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#14
post #9
post #6

Cool! What does building for cross platform look like? Would love if there was a command that produced my MacOs .app and Windows exe without me having to dive into package management/containers/signing headaches per platform.

The backends (FLTK/Gocoa) are using CGo, which currently does not support cross-compiling as far as I know. So you still need to have a build pipeline with multiple operating systems, signing/notarization tools, etc. :(

You can cross-compile Cgo, you "just" need a C compiler and linker that works for the target platform. osxcross, xgo have some or maybe you can set CC=zig cc.

For macOS you need signing/notarization tools either when building natively or when cross-compiling, it's not any different. `rcodesign` has made this process much easier in recent years.

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#15
post #7

Was looking for something like this some years back. Though I wanted Windows support too. Ended up switching to C++ to use wxWidgets, giving me small self contained binaries.

go-fltk does build and run on Windows, pretty well actually.

For a native toolkit, I was impressed to see FLTK supports Ctrl-+ and Ctrl+- to zoom the entire application like a browser. And https://github.com/fltk-rs/fltk-theme?tab=readme-ov-file#wid... really improved my impression of how "native" FLTK can be made to look.

On a related note, I discovered GoVCL https://z-kit.cc/en/ recently and am interested to try it out.

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#16
post #14
post #9

Earlier quoted context omitted.

The backends (FLTK/Gocoa) are using CGo, which currently does not support cross-compiling as far as I know. So you still need to have a build pipeline with multiple operating systems, signing/notarization tools, etc. :(

You can cross-compile Cgo, you "just" need a C compiler and linker that works for the target platform. osxcross, xgo have some or maybe you can set CC=zig cc. For macOS you need signing/notarization tools either when building natively or when cross-compiling, it's not any different. `rcodesign` has made this process much easier in recent years.

+1 for `CC=zig cc`. Feels like magic

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#17
If only I had known about this (or judging by commit history, if it existed) ~3 weeks ago. I've been saying for ages that either React ported to Go or a React-like framework for Go would be an incredible development experience, so this looks perfect (I used to be a big hater of React.js until I was enlightened by React.lua).

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#18

If only I had known about this (or judging by commit history, if it existed) ~3 weeks ago. I've been saying for ages that either React ported to Go or a React-like framework for Go would be an incredible development experience, so this looks perfect (I used to be a big hater of React.js until I was enlightened by React.lua).

Don't leave us hanging! What did you use instead 3 weeks ago?

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#19
I’ll have to give this a look! I’ve been looking for a simple way to use Go to write an internal development tool which is basically just a form with some buttons and text fields. I tried Gio, but had a hard time with wrapping my head around it. Right now I’m using wails and like it much better. This looks interesting and worth a look!

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#20
post #18

If only I had known about this (or judging by commit history, if it existed) ~3 weeks ago. I've been saying for ages that either React ported to Go or a React-like framework for Go would be an incredible development experience, so this looks perfect (I used to be a big hater of React.js until I was enlightened by React.lua).

Don't leave us hanging! What did you use instead 3 weeks ago?

Wails https://wails.io>. I wanted to use Go but wasn't as familiar with native UI as with HTML/CSS/JS, I tried out most of the other popular Go UI frameworks too though they didn't feel as comfortable to use as Spot's React-like model.

Wails is still pretty epic as well though.

Post reply on HN