[HN Gopher] Gokrazy - A Native Go Userland
       ___________________________________________________________________
        
       Gokrazy - A Native Go Userland
        
       Author : robfig
       Score  : 55 points
       Date   : 2022-01-16 19:41 UTC (3 hours ago)
        
 (HTM) web link (gokrazy.org)
 (TXT) w3m dump (gokrazy.org)
        
       | ed25519FUUU wrote:
       | 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.
        
         | allset_ wrote:
         | There's a new(er) fork that doesn't use CGo.
         | 
         | https://github.com/zombiezen/go-sqlite
        
       | cpach wrote:
       | Very interesting project.
       | 
       | Has anyone tried it?
       | 
       | Apparently they have written their own init:
       | https://gokrazy.org/userguide/process-interface/
       | 
       | This makes me curious. I wonder how well Gokrazy would blend with
       | s6/s6-rc...
       | 
       | If anyone is curious there's more info about those projects here:
       | 
       | https://skarnet.org/software/s6/
       | 
       | https://skarnet.org/software/s6-rc/
        
         | hamburglar wrote:
         | I've tried it. It's very neat. I wrote a PoC music player on it
         | and it boots up and begins playing music in about 4 seconds if
         | I recall. Has a neat optional web-based service control UI that
         | lets you see the logs and stop/start the "services." Has a cool
         | dual-boot-image scheme so you can boot a new one and roll back
         | to the old one if needed (takes double the space on the boot
         | drive but it's still pretty small).
         | 
         | It's still kind of a toy, however. There is no C runtime, and
         | the maintainer has declared that there never will be (part of
         | the point of the project is not worrying about that kind of
         | complexity) so including anything C-based is going to be an
         | adventure/unsupported. And the maintainer's use case is custom
         | built personal servers, so he is explicitly ok with, for
         | example, having to hardcode your wireless config because there
         | is no (and apparently never will be) a wpa_supplicant.
         | 
         | But if it had a golang wpa_supplicant implementation and a
         | graphics library (I've done a little fb drawing on it and it
         | works but it really needs acceleration) it would make a really
         | nifty platform for little devices with an HDMI UI.
        
         | bdittmer wrote:
         | I use it to run internal services I don't want going down when
         | I'm messing around in the homelab. Namely: internal DNS, MQTT
         | broker and various prometheus pollers (e.g. unifi-poller). I'm
         | a big fan of this project.
        
           | PhilippGille wrote:
           | Do you have a blog article or so that describes this in more
           | detail? It sounds interesting!
        
       | c7DJTLrn wrote:
       | gokrazy is a very cool project and something I'd like to see more
       | of. It'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'd need, like managing
       | networking, connecting to Wi-Fi access points, performing
       | upgrades and so on. But it's such a massive undertaking so we're
       | stuck depending on software written in C via FFI or exec'ing
       | shell commands -- pretty gross.
        
         | jonpalmisc wrote:
         | I run into this often and share the same desire. I quite like
         | Go, but unfortunately the interaction of "my interests" (such
         | as the userspace library you suggested) and "things Go excels
         | at" isn't very large. Having to do everything important through
         | FFI or shell commands defeats the purpose of writing Go, imo.
        
       | dang wrote:
       | A couple past threads:
       | 
       |  _Gokrazy: a pure-Go userland for Raspberry Pi 3 appliances_ -
       | https://news.ycombinator.com/item?id=20357605 - July 2019 (9
       | comments)
       | 
       |  _Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances_ -
       | https://news.ycombinator.com/item?id=16672866 - March 2018 (87
       | comments)
        
       ___________________________________________________________________
       (page generated 2022-01-16 23:00 UTC)