$ luarocks install lua-yar-grpclua-yar-grpc is a pure, runtime-agnostic Lua library that converts
between gRPC protobuf frames and Yar call semantics (method name,
positional params, retval shape). It is intentionally free of any
ngx.* / cosocket dependency so it can be unit-tested in plain LuaJIT
and reused across OpenResty, APISIX, Kong and other hosts.
Forward conversion (Yar -> gRPC): YAR positional params -> protobuf
encode -> gRPC frame. gRPC response frame -> protobuf decode -> YAR
retval.
Reverse conversion (gRPC -> Yar): pb decode -> extract params -> YAR
method + params. YAR retval -> map response -> pb encode.
Scope boundary: the Yar binary wire format (magic / 82-byte header /
msgpack body) is owned by lua-yar; transport (socket, body read/write)
is owned by the caller (bridge). This library does pure call-semantics
conversion only — it does not create yar.client or handle transport.