gear-wasmtime-cache 2.0.0

Wasmtime executor's in-memory module cache used by Gear nodes
Documentation

Wasmtime module cache.

The cache uses a per-code "single flight" protocol. The first thread that misses the LRU for a code hash records that hash in compiling, drops the lock, and compiles the module. Threads requesting the same hash wait on a condition variable, while threads requesting other hashes can reserve their own compile slots and proceed independently.

A CompilePermit represents ownership of one in-progress compile. Dropping it always removes the hash from compiling and wakes waiters, so both successful compilation and early errors unblock the next thread.