I made RGFW, which calls Objective-C MacOS's API functions in Pure C.
BUT I would also like to mention a project a friend and I made called Silicon. Silicon is a single-header C wrapper around the Pure-C calls, which makes it far more convenient to use.
Well for one you're able to easily use macros to customize features you want and don't want. Plus "forcing me to figure out the specific XYZ_IMPLEMENTATION" is a big of a weird compliant. You could say the same thing about linking a library. Besides, it's not hard to figure out and is usually one of the first lines of the file.
The single-header format also gives you MORE ways to compile the library and control which features to use or not use.
Thanks for the advice, I'm a little worried about breaking compatibility with compilers that don't support stdint. But if it's standard for C99 thing then sure.
- Better API design
- Not being experimental after 11 years
I think that Wayland actually has some steps in the right direction, but overall I don't think it's actually a very good alternative. It's way more low-level than X11 and a lot of higher level features, like window decorations, are not even officially supported.
We'd be at the same spot, single-header files are still useful.
A single-header file is not a 'full-sized' library compressed into one file it's codebase is designed to actually be minimalist. Many libraries have single files that are the same size as their alternative single-header.
It is a single-header library in terms of the format, yes. But it is also not designed to be a single-header library, unlike an STB-style library.
Nuklear is a full-sized library that can be compiled into and used as one file. However, RGFW and STB are designed to be lightweight and minimalistic. That's the distinctive part of single-header libraries, also known as STB-style libraries.
To be clear, I don't mean this to hate on Nuklear, it's a cool UI library, but its design doesn't match the single-header format.
BUT I would also like to mention a project a friend and I made called Silicon. Silicon is a single-header C wrapper around the Pure-C calls, which makes it far more convenient to use.
https://github.com/eimamei/silicon
I no longer use it in RGFW because I wanted to remove the extra dependency.