All C distribution

I like the LFS/BLFS projects. Also, like some of the useful tools from suckless.org. Was recently discussing with another developer about the possibility of an ultra-lightweight all C distribution. Was wondering if anyone has already run across such a thing. It would be nice to combine effort on a project rather than reinventing the wheel if there’s already something out there. If there isn’t, is anyone else interested in seeing something like that developed?

The closest thing would be BSD… any of the varieties… FreeBSD, GhostBSD, NetBSD, OpenBSD.
Most of the Linux varieties are being corrupted by Rust… so not all C.
The BSD’s differ in that they only allow original system install files in / and /usr.
Everything else you may add, even the DE or WM , goes in /usr/local/…, so they nicely separate the original lightweight system. OpenBSD goes even further and insists on separate partitions.

I am interested in why “all C” is important to you. Are you making a small embedded system? You might be interested in musl libraries as an alternative to glibc.
Void Linux allows musl builds.

If you are interested in init systems, S6-66 is all C, and therefore portable, and it can compile with musl.

The closest thing in Linux would be Hyperbola Linux. … and they are changing to a BSD kernel.

Another idea. I will have to check in Gentoo. It certainly allows a lightweight build, but I am not sure about all C… it may have a USE flag that would enforce it.

2 Likes

Have you thought that you’d be without a modern web browser, as basically all browser engines (except for dillo, which is basically unusable at this point) are written in C++?

2 Likes

I prefer musl to glibc. Was planning on working with it. I’ll check out Hyperbola Linux. Thanks for mentioning it.

2 Likes

I have a couple of options for a web browser that I’m looking into. Also, Gemini looks like an interesting protocol and there are C browsers for it. I’m not that concerned about Internet connection for this particular use case.

2 Likes

I did a study of hyperbola. If you search for hyperbola on this forum you will find the topics.
You will at least get some useful links there.

2 Likes

Thanks for the pointer to your posts. Really interesting seeing the RAM size comparisons. Was surprised by how much better it did than AntiX in that comparison. Usually, I find AntiX does very well on low resource systems. I typically use jwm instead of icewm though so that may help with memory a little.

2 Likes

@Laura_Michaels ,
I had a look at Gentoo.
It would seem there is no USE flag that would automatically compile a C only Gentoo.
You would have to mask packages individually in /etc/portage/package.mask.
That would be tedious.
Masking the C++ compiler might help.

I think I prefer LFS/BLFS to Gentoo. I already have my own build scripts, (something similar to slackbuild scripts) and some basic package building and managing tools I’ve written. I wouldn’t want to mask packages. I’d just try to find packages that I liked, written in the programming languages I want to work with and build from source and use them. If functionality I need is missing, I usually end up patching and adding features. Occasionally my patches are accepted upstream, but not always.

1 Like

For what you want to do, I agree… you need complete flexibility.

Have you thought about making a docker image rather than or as well as a full OS.
More people might use that, because the focus is on small in docker images.

1 Like

Besides, all the gentoo plumbing (portage, eselect, etc.) is written in python.

Void has a MINIMAL install, which doesn’t even give you manual pages, firmware, or wifi. Last time I checked it occupied about 96MB when done installing.

It uses shell scripts (dash) for a lot of its tooling (which you’ll need to install yourself).

In case you’re concerned with Void taking too much disk space, there’s Tiny Core Linux (NOTE: non-https site). It’ll take all of a whopping 11MB on a minimal install. Do not expect any luxury at this size, though.

1 Like

TinyCore is a nice distribution. nanolinux was built using it. However, for a minimal system, it uses a lot of RAM. If it wasn’t so RAM intensive it would be a great base for some of the projects I’m experimenting with. Sometimes I’ll use Debian netinst or AntiX to get a minimal system up quickly and then I can build and add my own packages. Void is interesting. I like their choice of musl for a C library. Doubt they’d need my help on anything with their distribution. A lot of the smaller distributions tend to use packages that are as close to upstream as possible and I tend to build and run packages with a lot of modifications and patches.

1 Like