4 ms·
> I don't understand the appeal of trying to strip the Linux kernel down, then introducing additional specialized code like nolibc The appeal is you can elimin
by matheusmoreira 4y ago
> I don't understand the appeal of trying to strip the Linux kernel down, then introducing additional specialized code like nolibc
The appeal is you can eliminate every single dependency. Linux is the only kernel with a stable user space interface. It's the only system where you can do this.
With a single 6-ary system call function, you can do anything you want on Linux. There's no need for anything else.
> What's the upside of using the (relatively large and complex) Linux kernel for this?
The kernel's massive amount of features and drivers for one.
> I doubt it's reliability, since the kernel in this particular configuration is essentially untested.
This is not a kernel configuration though. User space is completely separate from the Linux kernel.
- geocar 4y ago> It's the only system where you can do this. Linux is the only kernel with a stable user space interface. The system call numbers are stable on most unixes (including XNU/Darwin). It's just Windows that doesn't have stable syscall numbers.
- matheusmoreira 4y agoI used to think that too but it turned out Linux really is the only kernel with this property. I have written about this subject in more detail here: https://www.matheusmoreira.com/linux/system-calls https://www.matheusmoreira.com/linux/system-calls
- cleanchit 4y agoHow is nolibc better than musl or a static executable?
- matheusmoreira 4y agoIt gives you access to 100% of Linux's system calls. It eliminates a lot of global state. It gets rid of a lot of legacy C library crap. Years ago I wrote a rationale for such a thing in my liblinux project: https://github.com/matheusmoreira/liblinux/blob/master/README.markdown#why https://github.com/matheusmoreira/liblinux/blob/master/READM... I don't maintain it anymore because nolibc is better but there's a lot of references in that text if you'd like to read them.
- cleanchit 4y agoThe page talks about glibc.
- pjmlp 4y agoNo it is not, for the purposes described in the article there are several FOSS embedded OSes for "unikernel" like deployments. RTEMS, Azure RTOS, AWS RTOS, NuttX, Mbed...
- matheusmoreira 4y agoThe Linux kernel is still a separate component even if you deploy a kernel + nolibc application thing.
- pjmlp 4y agoJust like in some of those OSes, as they have several deployment workflows.