minicoro

Nim wrapper for minicoro - a tiny Lua-like asymmetric coroutine library

Wrapper score 15/100 · tests present · no docs generated

Wraps a native library — check OS Compatibility below for platform-specific linking notes.

Summary

Latest Version 0.1.3
License Unlicense
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:25

Authors

  • Locria Cyber

Installation

nimble install minicoro
choosenim install minicoro
git clone https://git.envs.net/iacore/minicoro-nim

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
minicoro - - - - - - -

Dependencies

Package Version Optional
nim >= 1.6 No

Source

Repository https://git.envs.net/iacore/minicoro-nim
Homepage https://git.envs.net/iacore/minicoro-nim
Registry Source nimble_official

README

Coroutine in Nim, courtesy of https://github.com/edubart/minicoro

Warning: minicoro is not tested without --mm:orc or --mm:arc

Usage

import minicoro

proc coro_entry(co: Coro) {.cdecl.} =
  var data: int
  co.pop(data)
  echo data # print 42

  co.yield


var desc = initCoroDesc(coro_entry, 0)
let co = desc.create()

co.push(42.int) # each corotine has its own storage stack

assert co.status == coSUSPENDED
co.resume
assert co.status == coSUSPENDED
co.resume
assert co.status == coDEAD

co.destroy()

For another example, see this test file For complete API, see source code