descriptor

fun descriptor(request: CompileRequest, compiler: PeerId, traceparent: String? = null): TaskDescriptor

Builds the TaskDescriptor that dispatches request to compiler over the ring.

The descriptor is pinned to compiler (TaskDescriptor.pinnedOwner): only peers that registered the compile op can run it, and pinning is how the ring routes a task to a named capable peer today. If the compiler node is offline the task waits for it (pinned tasks never re-home) — compilation is an optimization, so the mesh keeps interpreting in the meantime.

A homogeneous mesh where every peer is a compiler node may instead build a plain TaskDescriptor(CompileOp.ID, request.encode()) and let the hash ring pick the owner.

Parameters

request

What to compile, for which target, at which opt level.

compiler

The peer that registered the compile op via WarpNode.registerCompiler.

traceparent

Optional W3C Trace Context header value; see TaskDescriptor.traceparent.