I made a fiber implementation just now (nimfiber). And it was almost borrow from standard lib coro. But I'm a noob to nim, so don't understand some APIs used in coro:
proc GC_addStack(starts: pointer) {.cdecl, importc.}
proc GC_removeStack(starts: pointer) {.cdecl, importc.}
proc GC_setCurrentStack(starts, pos: pointer) {.cdecl, importc.}
proc getFrame*(): PFrame {.compilerRtl, inl.}
proc setFrame*(s: PFrame) {.compilerRtl, inl.}
Please help! T.T
And another issue is that should coro be implemented like this to be more useful? Some high level library may heavily use fiber like goroutine/actor/rpc.