TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

309 pointsby da_rob12 months ago
Hi HN, I’m excited to share Spot, a simple, cross-platform, React-like GUI library for Go. It is just a few days old and has lots of missing features but I&#x27;m happy with the results so far, and looking for some design feedback.<p>Spot is designed to be easy to use and provide a consistent API across different platforms (mainly Mac &amp; Linux). It’s inspired by React, but written in Go, aiming to combine the best of both worlds: the easy tooling &amp; performance of Go with a modern, reactive approach to UI development.<p>Key features:<p>- Cross-platform: Leveraging FLTK[1] &amp; Cocoa[2], Spot works on Mac, Linux, and the BSDs with plans for native Windows support in the future.<p>- Reactive UI: Adopts a React-like model for building UIs, making it intuitive for those familiar with reactive frameworks.<p>- Traditional, native widget set: Utilizes native widgets where available to provide a more traditional look and feel.<p>Why I built it:<p>I was searching for a cross-platform GUI toolkit for Go that had a more traditional appearance, and none of the existing options quite met my needs. I then started playing with Gocoa and go-fltk and suddenly I worked on an experiment to see how challenging it would be to build something like React in Go, and it kinda evolved into Spot. ¯\_(ツ)_&#x2F;¯<p>In 2024, is there a still place for classic desktop GUIs—even with a modern spin?<p>I’d love to hear your thoughts, feedback, and any suggestions for improvement. Also, contributions are very welcome.<p>Thank you for checking it out!<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;pwiecz&#x2F;go-fltk">https:&#x2F;&#x2F;github.com&#x2F;pwiecz&#x2F;go-fltk</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;roblillack&#x2F;gocoa">https:&#x2F;&#x2F;github.com&#x2F;roblillack&#x2F;gocoa</a>

18 comments

heywire12 months ago
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!
评论 #40472817 未加载
jerf12 months ago
&quot;Cross-platform: Leveraging FLTK[1] &amp; Cocoa[2], Spot works on Mac, Linux, and the BSDs with plans for native Windows support in the future.&quot;<p>I&#x27;d seriously recommend that you consider cutting this. Perhaps keep the lessons you&#x27;ve learned to retain future flexibility, but get good on one toolkit first. GUI toolkits, GUI bindings, GUI in general drowns you in details as it is, volunteering to drown in several different underlying toolkit&#x27;s details may sound appealing because you may feel like you&#x27;re growing your metaphorical market, but what you will almost certainly end up with is doing all toolkits badly instead of even one toolkit well, and that won&#x27;t be good.<p>We&#x27;ve all heard about how the first 90% is 90% of the work, and then the remaining 10% is another 90% of the work. GUIs make that look like hopeless pie-in-the-sky optimism, where the first 10% is 90% of the work, and then the next 10% is ten times the work, and then the next 10% is another ten times the work. Trying to be cross-platform will strangle you.<p>However, based on my experience with some similar previous discussions, I don&#x27;t expect you to immediately buy and agree with my arguments. What I&#x27;ll <i>really</i> suggest then is to keep what I&#x27;ve said here in the back of your mind, and when you find you&#x27;re staring down the three toolkits that rigidly require a three-way mutually contradictory way of handling rich text or something, then think back to this post and consider giving yourself permission to drop all but the best-supported and&#x2F;or most popular underlying toolkit.
iamcalledrob12 months ago
I have been looking for something like this in Go for a while. I think there&#x27;s a real opportunity for Go to provide a great developer experience for cross platform UI due to how simple the build process is. Speaking from experience, half the pain of cross platform development is managing build complexity, which Go basically eliminates.<p>I&#x27;m curious how you&#x27;ll end up solving for cross-platform layout when native controls have different intrinsic sizes per platform?<p>This is something I haven&#x27;t seen solved super well in cross platform toolkits.<p>Wishing you luck though.
allanrbo12 months ago
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.
评论 #40471311 未加载
评论 #40470433 未加载
评论 #40473335 未加载
felipefar12 months ago
I&#x27;m curious to hear your take on this: what&#x27;s the advantage of following the virtual control tree approach compared to instead updating directly the controls that are displayed to the user?
评论 #40472801 未加载
sandreas12 months ago
Looks great! Thanks for sharing.<p>Would you consider listing the supported platforms in the readme? I think that would be a pretty interesting piece of information:<p><pre><code> - Windows - Linux - macOS - *BSD - Android - iOS - Web - Tizen </code></pre> Maybe like it&#x27;s on flutter docs: <a href="https:&#x2F;&#x2F;docs.flutter.dev&#x2F;reference&#x2F;supported-platforms" rel="nofollow">https:&#x2F;&#x2F;docs.flutter.dev&#x2F;reference&#x2F;supported-platforms</a>
KingOfCoders12 months ago
I applaud your effort, but cross plattform with no Windows support?
评论 #40474136 未加载
评论 #40473801 未加载
评论 #40472562 未加载
Heliodex12 months ago
If only I had known about this (or judging by commit history, if it existed) ~3 weeks ago. I&#x27;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).
评论 #40472183 未加载
评论 #40471612 未加载
Fire-Dragon-DoL12 months ago
Main problem is that when you release on desktop, a web version is usually desirable (except for very niche apps that interact a lot with the OS).<p>Alternatively, something that targets many platforms, including mobile.<p>I&#x27;ve been searching for something for quite a while and the closest is qt and react native, both painful choices for various reasons
getcrunk12 months ago
Fltk supports windows. Will you be using another solution and that’s why u don’t support windows yet?
评论 #40472764 未加载
ygnasygnoimqwb12 months ago
&gt; runtime.LockOSThread()<p>&gt; <a href="https:&#x2F;&#x2F;github.com&#x2F;roblillack&#x2F;spot&#x2F;blob&#x2F;main&#x2F;ui&#x2F;init_fltk.go#L23">https:&#x2F;&#x2F;github.com&#x2F;roblillack&#x2F;spot&#x2F;blob&#x2F;main&#x2F;ui&#x2F;init_fltk.go...</a><p>Does this imply GOMAXPROCS needs to be set to at least 2?
评论 #40470393 未加载
scosman12 months ago
Cool!<p>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&#x2F;containers&#x2F;signing headaches per platform.
评论 #40470365 未加载
评论 #40472594 未加载
gloosx12 months ago
This looks really cool but a bit incomplete and messy without XML-like syntax sugar for composing component functions. Is it even possible to extend Go like the JSX?
jakjak12312 months ago
Very cool idea!<p>If someone implements GTK I would absolutely use it, its just fltk is no fun in Linux world
zem12 months ago
interesting that this uses fltk; I&#x27;ve seen very few language bindings to it
andrewfromx12 months ago
Been using<p><a href="https:&#x2F;&#x2F;fyne.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fyne.io&#x2F;</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;fyne-io&#x2F;fyne">https:&#x2F;&#x2F;github.com&#x2F;fyne-io&#x2F;fyne</a><p>for years but will check this out<p>( terminal but still great go guis:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;gizak&#x2F;termui">https:&#x2F;&#x2F;github.com&#x2F;gizak&#x2F;termui</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;charmbracelet&#x2F;bubbletea">https:&#x2F;&#x2F;github.com&#x2F;charmbracelet&#x2F;bubbletea</a> )<p>Never used but should be in this list:<p><a href="https:&#x2F;&#x2F;gioui.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gioui.org&#x2F;</a><p><a href="https:&#x2F;&#x2F;mattn.github.io&#x2F;go-gtk&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mattn.github.io&#x2F;go-gtk&#x2F;</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;lxn&#x2F;walk">https:&#x2F;&#x2F;github.com&#x2F;lxn&#x2F;walk</a>
评论 #40475339 未加载
评论 #40474912 未加载
ASalazarMX12 months ago
I don&#x27;t know how to take this in. On one side, it&#x27;s great to have a cross-platform GUI toolkit that&#x27;s easy to use; on the other side, it feels like a React-like UI is contrary to the spirit of simplicity and resource efficiency of Go.<p>I&#x27;m sure it has its perfect use cases, though.
评论 #40470027 未加载
评论 #40470024 未加载
kdma12 months ago
Just for curioristy why did you adopot a react-like model and not implement react-dom as projects like react native do?
评论 #40475324 未加载