tidwall / neco

Concurrency library for C (coroutines)
MIT License
1.1k stars 79 forks source link

README: clarify hardware support and fallback mechanism + more exact origin of assembly code #3

Open matu3ba opened 4 months ago

matu3ba commented 4 months ago

First of, this looks very nice.

Luajit does not support all targets, so it would be nice to have the supported platforms as matrix, ideally in section Features.

Further more, it would be nice to have the exact commit hashes the assembly was created from.

tidwall commented 4 months ago
Platform Assembly Method Fallback
Linux ARM/ARM64/x86_64/rv64 ucontext
Mac ARM64/x86_64 ucontext
BSD ARM64/x86_64 ucontext
Windows x86_64 N/A
WebAssembly N/A Asyncify

The assembly code in Neco is from the embedded packages https://github.com/tidwall/sco and https://github.com/tidwall/llco. Those packages use assembly from the minicoro library (MIT-0), specifically https://github.com/edubart/minicoro/commit/ff5321d93fe2a3fb067a8dd97a37dd623337b9c0. The minicoro assembly implementation is inspired by Lua Coco by Mike Pall.

calvin2021y commented 4 months ago

what about ios/android support ?

tidwall commented 4 months ago

@calvin2021y I haven’t tested on those platforms. It may work with minimal tweaking, since both have posix apis that are similar to Mac and Linux.