Running Go Application on Bare Metal

In the process of writing eggos, I found that removing the hardware initialization code, the main program is actually an ordinary Go program. Like other Go programs, the main function is used as the entry point, but it never returns. Can other ordinary programs also run on bare metal? The answer is yes. I extracted the kernel code of eggos as a separate Go library. Other applications can run on bare metal like eggos by writing import _ "github.


前言 之前我写过一篇探索在裸机上运行 Go 程序的文章,里面介绍了在裸机上运行 Go 代码需要的技术,顺便介绍了 eggos,一个运行于裸机的 unikern

Dlv支持GDB Stub

前言 开发 eggos 的过程中一直使用 GDB 做调试,诸多功能都非常不方便,比如对 goroutine 的打印,变量的展开等等。dlv 是 go 专属的调试器,也是 go 官方推荐的: Note that Delve is

Golang IO的妙用

golang标准库对io的抽象非常精巧,各个组件可以随意组合,可以作为接口设计的典范。这篇文章结合一个实际的例子来和大家分享一下。 背景 以一个