16 ms·
> But do you run a lot of software that works without glibc and other userland utilities? Yes. I made a few of these utilities for my own use. I actually star
by matheusmoreira 5y ago
> But do you run a lot of software that works without glibc and other userland utilities?
Yes. I made a few of these utilities for my own use. I actually started developing a Linux system call library to facillitate this but then I discovered the kernel developers themselves already made one for their own tools.
https://github.com/torvalds/linux/blob/master/tools/include/nolibc/nolibc.h https://github.com/torvalds/linux/blob/master/tools/include/...
People can include this awesome header file in a freestanding C project and enjoy making 100% dependency-free Linux binaries. No C standard library cruft anywhere. It's amazing. You could boot Linux directly into one of these things just by writing init=/my/program in the kernel command line. You'd need to do some init stuff like mounting procfs and sysfs but it's totally fine. I've even seen graphical software running this way with OpenGL ES on top of kernel interfaces for mode setting and buffer management, people could even make video games that run this way. I really want to get into this.
- southerntofu 5y ago> https://github.com/torvalds/linux/blob/master/tools/include/ https://github.com/torvalds/linux/blob/master/tools/include/... Cool, thanks for sharing! > I really want to get into this. Hope to see more links on that topic popping up on HN. Are you aware, beyond "raw" OpenGL, of any GUI/TUI frameworks for Go/Rust that would work this way?
- matheusmoreira 5y ago> Are you aware, beyond "raw" OpenGL, of any GUI/TUI frameworks for Go/Rust that would work this way? I'd like to know as well. My most recent discovery was RetroArch, a really good frontend for many emulators. It's not freestanding but it does support OpenGL graphics with Linux kernel mode setting and generic buffer management. https://www.retroarch.net/2020/01/linux-kms-mode.html https://www.retroarch.net/2020/01/linux-kms-mode.html