Bunki
minicoro
Bunki | minicoro | |
---|---|---|
5 | 7 | |
227 | 729 | |
0.9% | 4.1% | |
6.8 | 2.0 | |
over 1 year ago | 5 months ago | |
C | C | |
MIT License | GNU General Public License v3.0 or later |
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.
Bunki
-
Coroutines in C
I honestly like stackful coroutines if you don’t mind allocating memory for a stack.
https://github.com/Keith-Cancel/Bunki
-
A simple C coroutine library, with multithreading and more, Go and C++20 style
Like you mention other libraries, but how does this compare to something like this?
https://github.com/Keith-Cancel/Bunki
when compared to context switches having just giving things a cursory glance.
Also it seems to be trying to handle a lot of styles/handling of co-routines. Is there a reason for not really just choosing one style
- Bunki, a C Coroutine Library
minicoro
-
Philosophy of Coroutines (2023)
I share the author's enthusiasm for coroutines. They're nice abstractions for all sorts of state-machine-like code and for concurrency (without parallelism).
> You could allocate a piece of memory for a coroutine stack; let the coroutines on it push and pop stack frames like ordinary function calls; and have a special ‘yield’ function that swaps out the stack pointer and switches over to executing on another stack. In fact, that’s not a bad way to add coroutines to a language that doesn’t already have them, because it doesn’t need the compiler to have any special knowledge of what’s going on. You could add coroutines to C in this way if you wanted to, and the approach would have several advantages over my preprocessor system.
In C minicoro is a nice library that provides just that: https://github.com/edubart/minicoro
In Zig there's zigcoro: https://github.com/rsepassi/zigcoro
Another source I found enlightening on coroutines is "Coroutines in Lua": https://www.lua.org/doc/jucs04.pdf
-
How Much Memory Do You Need to Run 1M Concurrent Tasks?
It would be interesting to bench something extremely lightweight (like https://github.com/edubart/minicoro) against these runtimes.
By my back-of-the-napkin math, 1,000,000 coroutines would cost about 64mb + 2mb/core for stacks.. which works out to about 4x less memory than the 'winner' of this comparison, and ~30x less than go.
- Show HN: Stackful Coroutines for C
- Show HN: Asymmetric stackful cross-platform Coroutines in pure C
-
Ask HN: What Are You Working On?
A single header asymmetric stackful cross-platform coroutine library in pure C.
https://github.com/edubart/minicoro
- Minicoro - Single header cross-platform coroutine library
- Show HN: Minicoro – Single-header Coroutine library for C
What are some alternatives?
Tina - Tina is a teeny tiny, header only, coroutine and job library.
nbnet - single header C(99) library to implement client-server network code for games
libco - Mirror of http://byuu.org/library/libco/
covid_status
ares - ares is a cross-platform, open source, multi-system emulator, focusing on accuracy and preservation.
alang - A minimal viable programming language on top of liblgpp