Skip to Content
PackagesHost librariesswarm (native)

swarm is message passing inside a worker pool. Import it by bare name, the native engine builds it in, and it is meaningful to programs running under edge swarm.

The surface is send. send(group, body) queues a message to a group, fire and forget, and a node of that group picks it up with the receive() builtin, which needs no import.

from swarm import send msg = receive() send("transform", msg + "-done")

A send never blocks, so a pool stays free of circular deadlock. Eval groups run untrusted code without it, importing swarm from a snippet fails the run.

Last updated on