[ANN] Unik, a Go unikernel capable of running Gio GUI programs

5,384 views
Skip to first unread message

Elias Naur

unread,
Apr 13, 2020, 2:42:17 PM4/13/20
to golang-nuts
Hi,

I just completed the proof-of-concept for a Go unikernel, Unik, which allows Go programs
to run without an operating system directly in virtual machines. Unlike similar projects
Unik is written in Go (and assembler), and it is compiled into Go programs just like any other
Go dependency. Unik does includes a UEFI bootloader written in C.

The source code is open sourced at


along with a demo that demonstrates a funtional Gio GUI program (GPU+mouse works, I ran
out of time to implement a keyboard driver).

The project is an experiment in a larger exploration of the question: "what if the operating
system process abstraction were a virtual machine? It's also a response to my failed attempt
to get unikernel support into upstream Go project (https://github.com/golang/go/issues/35956);
Unik pretends to be a Linux kernel, implementing enough system calls to fool the Go runtime.

-- elias

Wojciech S. Czarnecki

unread,
Apr 13, 2020, 5:00:28 PM4/13/20
to golan...@googlegroups.com
Dnia 2020-04-13, o godz. 11:42:16
Elias Naur <ma...@eliasnaur.com> napisał(a):

> https://eliasnaur.com/unik

Thank you. Respect! :)

> -- elias

--
Wojciech S. Czarnecki
<< ^oo^ >> OHIR-RIPE

Brian Candler

unread,
Apr 13, 2020, 5:06:31 PM4/13/20
to golang-nuts
On Monday, 13 April 2020 19:42:17 UTC+1, Elias Naur wrote:
The project is an experiment in a larger exploration of the question: "what if the operating
system process abstraction were a virtual machine?

Interesting.

BTW, have you seen gVisor?  It takes a different approach to the problem: emulating the syscall interface on top of a running kernel, rather than on top of (real or emulated) bare metal.  I was reminded of it since it also "pretends to be a Linux kernel" - and is written in Go.

Michael Jones

unread,
Apr 13, 2020, 7:16:40 PM4/13/20
to Brian Candler, golang-nuts
IBM VM/370 and much that followed is exactly this “VM is a hardware abstraction” line of reasoning. Logging into a user session was to “IPL a machine.” (Initial Program Load, imagine an IBM PC bios screen rushing by)

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/4b4e4279-19d6-4afc-b743-c1cfa3e9c6a0%40googlegroups.com.
--
Michael T. Jones
michae...@gmail.com

hitech...@gmail.com

unread,
Apr 14, 2020, 1:05:25 AM4/14/20
to golang-nuts
Congrats on building this! What you have done is amazing. I have always wanted to do something like this but never did find the time nor commitment.

https://groups.google.com/forum/m/#!topic/gvisor-users/T2WBS7DDehU

Elias Naur

unread,
Apr 14, 2020, 3:12:00 AM4/14/20
to Michael Jones, Brian Candler, golang-nuts
On Mon Apr 13, 2020 at 4:15 PM, Michael Jones wrote:
> IBM VM/370 and much that followed is exactly this “VM is a hardware
> abstraction” line of reasoning. Logging into a user session was to
> “IPL a
> machine.” (Initial Program Load, imagine an IBM PC bios screen rushing
> by)
>

Exactly. It was embarrassing to re-discover the virtues of past
computing.

Elias Naur

unread,
Apr 14, 2020, 3:14:33 AM4/14/20
to Brian Candler, golang-nuts
On Mon Apr 13, 2020 at 2:06 PM, Brian Candler wrote:
> ------=_Part_1452_1022817720.1586811991060
> Content-Type: text/plain; charset="UTF-8"
>
> On Monday, 13 April 2020 19:42:17 UTC+1, Elias Naur wrote:
> >
> > The project is an experiment in a larger exploration of the question:
> > "what if the operating
> > system process abstraction were a virtual machine?
> >
>
> Interesting.
>
> BTW, have you seen gVisor <https://gvisor.dev/docs/>? It takes a
> different
> approach to the problem: emulating the syscall interface on top of a
> running kernel, rather than on top of (real or emulated) bare metal. I
> was
> reminded of it since it also "pretends to be a Linux kernel" - and is
> written in Go.
>

Yes. gVisor is similar in many ways and I hope to re-use parts of it,
for example their Go network stack implementation.

The main difference is that I want to avoid the Linux kernel, or any
kernel for that matter.

-- elias
Reply all
Reply to author
Forward
0 new messages