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.

Gokrazy – A Native Go Userland

160 pointsby robfigover 3 years ago

9 comments

dangover 3 years ago
A couple past threads:<p><i>Gokrazy: a pure-Go userland for Raspberry Pi 3 appliances</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20357605" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20357605</a> - July 2019 (9 comments)<p><i>Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16672866" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16672866</a> - March 2018 (87 comments)
cedwsover 3 years ago
gokrazy is a very cool project and something I&#x27;d like to see more of. It&#x27;s not a unikernel per se but it shares the idea of packaging your code and the OS together and shipping it as one. My dream would be a pure Go userspace library to do absolutely anything related to system management you&#x27;d need, like managing networking, connecting to Wi-Fi access points, performing upgrades and so on. But it&#x27;s such a massive undertaking so we&#x27;re stuck depending on software written in C via FFI or exec&#x27;ing shell commands -- pretty gross.
评论 #29960470 未加载
dingdingdangover 3 years ago
Be interesting to have at least a few benchmarks to see if cutting so much of the regular distro code actually has a positive impact beyond the idea of it being more reliable. And that last bit does seem to remain an idea rather than a reality in that quite a lot of regular userland code (systemd comes to mind) helps stabilise a running linux box over time in a very real way. Personal exp incl having several headless Ubuntu boxes run for more than a year with zero issues despite being saddled with typical server lamp server stack.<p>All up for trying this though and can definitely see real bonus in terms of less resource use within Pi envs!
francislavoieover 3 years ago
FWIW, Caddy would probably work with this, if you need a web server.<p>Caddy is pure Go, no CGO. We did a bunch of work recently to ensure that none of the dependencies have any CGO code enabled (involved asking upstream dependencies to switch to pure alternatives).
评论 #29991079 未加载
wishinghandover 3 years ago
I’m too rudimentary of a developer. What’s a Userland? What is this doing that writing apps as Go executables doesn’t or can’t do?
评论 #29962172 未加载
评论 #29964813 未加载
评论 #29961679 未加载
cpachover 3 years ago
Very interesting project.<p>Has anyone tried it?<p>Apparently they have written their own init: <a href="https:&#x2F;&#x2F;gokrazy.org&#x2F;userguide&#x2F;process-interface&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gokrazy.org&#x2F;userguide&#x2F;process-interface&#x2F;</a><p>This makes me curious. I wonder how well Gokrazy would blend with s6&#x2F;s6-rc…<p>If anyone is curious there’s more info about those projects here:<p><a href="https:&#x2F;&#x2F;skarnet.org&#x2F;software&#x2F;s6&#x2F;" rel="nofollow">https:&#x2F;&#x2F;skarnet.org&#x2F;software&#x2F;s6&#x2F;</a><p><a href="https:&#x2F;&#x2F;skarnet.org&#x2F;software&#x2F;s6-rc&#x2F;" rel="nofollow">https:&#x2F;&#x2F;skarnet.org&#x2F;software&#x2F;s6-rc&#x2F;</a>
评论 #29960291 未加载
评论 #29960851 未加载
rockwotjover 3 years ago
If you&#x27;re a fan of this approach to deploying applications and use docker, distroless [1] is a really cool project related to this. It uses debian as the base and supports cgo because it has glibc (and openssl)<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;GoogleContainerTools&#x2F;distroless" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;GoogleContainerTools&#x2F;distroless</a>
评论 #29963854 未加载
matthewfcarlsonover 3 years ago
It seems like a video output isn’t as much a priority. I’ve been looking at creating a raspberry pie powered arcade machine and I need it to be 100% reliable. A user land implementation seems like a good compromise over a bare metal application.
评论 #29962303 未加载
ed25519FUUUover 3 years ago
No CGO is hard because that means I can’t use SQLite libraries. This has been a continued frustration to me when writing portable Go apps.
评论 #29960825 未加载
评论 #29962863 未加载