Tbox: A GLib-like cross-platform C library
github.com
github.com
I wouldn't have thought to look, but I saw something about xmake the other day (by the same people). I still am probably going to stick with cmake (inertia), but cool stuff.
Should I then assume that the compatible platforms are actually more than the listed Windows, Linux, Mac, and mobile OSes?
I'm on the front of AVR development, and cool new things always arrive late (understandably, if they arrive at all...) to our little corner of the world :(
But I assume that "embedded" here will mean mainly ARM.
(similarly, I'm still excitedly waiting for more progress on the Rust front :)
"Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements."
Did you in fact specifically license it to the ASF? Or are you just licensing it under the Apache license?
You want the header for non-ASF code which can be found here:
Thanks.
And we use xmake to build it.
A comparison chart would be helpful! Similar to: http://www.etalabs.net/compare_libcs.html
Now, as a language developer, you actually don't have to worry about any of these. The c standard library will be provided by the os and you don't have to think about it. Some programming languages that want to replace c don't rely on the c standard library, but you shouldn't have to worry about that. As for abstracting out different platform apis, I would say that doesn't really belong in your language itself.
1: https://en.wikipedia.org/wiki/C_standard_library
2: https://developer.gnome.org/glib/
3: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NS...
If your compiler supports cross compiling, you might look into the strategies that Zig does[1]. If it only supports native builds, you probably want to detect the native libc. Again here it might be useful to look at what Zig does[2].
[1]: https://ziglang.org/download/0.4.0/release-notes.html#Zig-sh... [2]: https://ziglang.org/download/0.4.0/release-notes.html#Libc-D...
You can see https://github.com/tboox/tbox/tree/master/src/tbox/libc
I agree that a comparison would be good, but musl and glibc are low level fundamental API's for things like printf and opening files.
Glib and this are higher level libraries to build applications with. If you're building a compiler you probably want one of these, for the generated code it would depend a lot on the specifics.
Edit - I'll also add that a lot of people's experience with C seems to com from college or beginner material where they're learning in a very bare bones environment. Combine C and libraries like this and it's not just good for app development but can be great for scripting where python or bash would typically be used.
The versions do have other differences, of course, but they're rarely used (the next most common one is designated initializers, which for me are the most annoying to convert).
I mean, it is your code, i just found the grammar restrictions part weird since really there isn't that much of a practical difference between C99 and C89 to the point i personally never felt the need to use C99.
(note that i focus on the language bits, C99 provides some extra library functionality but even then the most useful part is stdint.h which can be implemented in almost any C89 compiler anyway)
printf("Hello World!\n");
int x = 7;
printf("%d!\n", x);
return 0;
This is a very serious restriction for me.Of course that is my opinion (and i'm generalizing of course), but that comes from my experience with working with others' code.
Unless a function has only two lines of code.
Rust is interesting if you can live with slow compile times and 4X the memory footprint of C.
two u_64 is .. sad (sometimes unavoidable)
no bzip2 but other good modern compressors which I guess is about what you need for jar and zip files.
openssl compatible crypto .. oy vey the chain of "who audits the code is now a mile long at the microphone"
But I totally get it may not be in your use case or first pass. Tiny home router builds? they'd want this. Anything doing IPv6 packet work testing or finding IPs in a structure will want this unless people code to the /64 model.
While this might be a valid point, I really don't like the manner in which it is expressed. Feigned surprise, pretend humility and, most importantly, lack of basic respect towards fellow developer(s).
Additionally why are there a bunch of generic sounding Chinese names in the comments with dead comments? Bot comments/SEO?
Pretty obviously. Gods know why though.
Even if this is the case, that's arguably just as much of a voting ring as bots.
What have you given to the programming world lately?
EDIT: it was pointed out that this last comment was abusive. Sorry about that.
If users aren't posting qua community members then the expectation is to provide a disclaimer.
EDIT: I am being a complete jerk tonight. Sorry again.