Let me introduce luamqtt - https://github.com/xHasKx/luamqtt - the MQTT client library for Lua programming language.
It's not based on any C module and written in pure Lua code from scratch and completely follows OASIS standards for the MQTT v5.0 and the MQTT v3.1.1 protocols.
The only main dependency is a luasocket module to open a TCP connection. But there is a mechanism to implement your own functions to open a TCP connection and send/receive from it. It's used, for example, in the OpenResty to use its ngx.socket.tcp module instead of luasocket.
This is a thread for discussion and feature requests of the luamqtt.
Alternatively, the GitHub issues are welcomed.