libds
live-bootstrap
Our great sponsors
libds | live-bootstrap | |
---|---|---|
6 | 28 | |
16 | 263 | |
- | - | |
0.0 | 9.4 | |
15 days ago | 12 days ago | |
C | Shell | |
MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
libds
-
Common libraries and data structures for C
I may as well throw my hat into the ring: https://github.com/lelanthran/libds
I decided that I wanted to be able to simply drop a single .h file and a single .c file into any project without have to build a `libBlah.so` and link it to every project that needed (for example) a hashmap.
The practical result is that using the hashmap only requires me to copy the header and source files into the calling project.
It does build as a standalone library too, so you can link it if you want.
My primary reason for starting this is that I was pretty unsatisfied with all of the string libraries for C. When all I want to do is concatenate multiple strings together, I don't want to have to convert between `char ` and `struct stringtype ` everywhere.
The string functions are very useful as they all operate on the standard `char *` (nul-terminated) type.
-
Buffet
That would be nice, then I wouldn't have to use non-standard stuff.
I made my own easy-to-incorporate-into-any-project library - https://github.com/lelanthran/libds - just copy the ds_*.h and ds_*.c into a project and you're good to go.
I'm not saying it will work for you, but it works for me.
-
BCHS: OpenBSD, C, httpd and SQLite web stack
> Is there a good string-manipulation C library?
You will have to define "good". My string library[1][2] is "good" for me because:
1. It's compatible with all the usual string functions (doesn't define a new type `string_t` or similar, uses existing `char `).
2. It does what I want: a) Works on multiple strings so repeated operations are easy, and b) Allocates as necessary so that the caller only has to free, and not calculate how much memory is needed beforehand.
The combination of the above means that many common* string operations that I want to do in my programs are both easy to do and easy to visually inspect for correctness in the caller.
Others will say that this is not good, because it still uses and exposes `char *`.
[1] https://github.com/lelanthran/libds/blob/master/src/ds_str.h
[2] Currently the only bug I know of is the quadratic runtime in many of the functions. I intend to fix this at some point.
-
Strings in C... tiring and unsafe. So I just made this lib. Am I doing it right, Reddit ?
As an example of an opaque pointer library, see https://github.com/lelanthran/libds/blob/v1.0.5/src/ds_ll.h - See line 7 for the typedef. - Lines 9, 10, 11 and 67, 68 and 69 for making it callable from C++.
I've done the same thing for my array library - use the first 4 bytes for the length, and everywhere else it behaves like a normal array (https://github.com/lelanthran/libds/blob/v1.0.5/src/ds_array.c)
So, I wrote a new library recently that works produces and consumes strings in the form that C already uses them in (making them more easily usable everywhere) - https://github.com/lelanthran/libds/blob/v1.0.5/src/ds_str.h
live-bootstrap
- Bored? How about trying a Linux speedrun? (2020)
-
SectorC: A C Compiler in 512 bytes
Not using this, but tangentially related is (full disclosure, i am a maintainer of this project) live-bootstrap, which uses about a KB of binary to do a full "Linux from scratch" style thing - read https://github.com/fosslinux/live-bootstrap/blob/master/part... for all 143 steps you have to go through to get there.
-
Saving Knowledge Post-Collapse
Actually you can skip a file system entirely if you do something like stage0 or live-bootstrap https://github.com/fosslinux/live-bootstrap
-
Every night
See https://github.com/fosslinux/live-bootstrap, and https://github.com/fosslinux/live-bootstrap/blob/master/parts.rst has all the steps we take.
- Goodbye to the C++ Implementation of Zig
-
what is the smallest linux system capable of building itself?
live-bootstrap builds a variety of intermediate systems, starting from a <1KB binary seed (kernel excluded). Check parts.rst for a description, it's kinda wild just how many C and C subset compilers get compiled... but the end result is a system with musl and GCC 4.7, from which building the latest GCC is 2 steps away.
-
Ken Thompson: Reflections on Trusting Trust (Turing Award Lecture)
There is also live-bootstrap which uses a similar bootstrap chain to Guix (stage0 -> Mes -> tcc -> gcc), but without needing Guile/guix-daemon binaries etc. The whole thing starts with just a 357-byte binary seed (source)!
- Collapsing Internet
- Zig is now self–hosted by default
-
Is Golang Compiler Open Source? (From Noob)
Thankfully there are multiple Go implementations so you can bootstrap using gccgo as well. And you can bootstrap the gcc toolchain (including gccgo) in various ways, for example using this process from a minimal binary seed: https://github.com/fosslinux/live-bootstrap
What are some alternatives?
nix-ld - Run unpatched dynamic binaries on NixOS
guix - Read-only mirror of GNU Guix — pull requests are ignored, see https://guix.gnu.org/en/manual/en/guix.html#Submitting-Patches instead
mescc-tools-seed - A place for public review of the posix port of stage0
brainfuck-x86-64 - A brainfuck interpreter written in x86-64 assembly
M2-Planet - The PLAtform NEutral Transpiler
rizin - UNIX-like reverse engineering framework and command-line toolset.
zig-bootstrap - take off every zig
sc - Common libraries and data structures for C.
stb - stb single-file public domain libraries for C/C++
bootstrap-seeds - The roots of trust for all architectures
chibicc - A small C compiler
libderp - C collections. Easy to build, boring algorithms. Dumb is good.