This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 10/5/2026.
Rings.ops
~import std/rings.opsKoru Standard Library: the name-addressed ring ops — joined via
rings.ops.kz · 2 tors
Koru Standard Library: the name-addressed ring ops — joined via · 18 more lines
Koru Standard Library: the name-addressed ring ops — joined via
`~part ops` in rings.kz.
std/rings:enqueue(feed, v) | ok |> .. | full |> ..
std/rings:dequeue(feed) | some v |> .. | none |> ..
The subject is the ring's declared name, not a handle: a ring is a named
static (the std/store model), shared across flows and threads by
construction. Each site rewrites to the tor `std/rings:new` generated —
`__ring_<n>_enqueue` / `__ring_<n>_dequeue` — so the call carries the
element type the declaration fixed, and the site's `|` arms ride
untouched.
Ordering law (same as store/channel): the declaration precedes its uses
in document order — transforms run in source order and a site finds the
ring by the `__rings_decl_<n>` marker `new` emitted.
No top-level imports — part files share the merged module's consts.
~[keyword|comptime|transform] pub tor enqueue {
expr: Expression,
invocation: *const Invocation,
item: std/compiler:*const Item,
program: std/compiler:*const Program,
reporter: std/compiler:*ErrorReporter,
allocator: std.mem.Allocator
} -> SiteResult~[keyword|comptime|transform] pub tor dequeue {
expr: Expression,
invocation: *const Invocation,
item: std/compiler:*const Item,
program: std/compiler:*const Program,
reporter: std/compiler:*ErrorReporter,
allocator: std.mem.Allocator
} -> SiteResult