openresty / lua-cjson

Lua CJSON is a fast JSON encoding/parsing module for Lua
http://www.kyne.com.au/~mark/software/lua-cjson.php
MIT License
436 stars 119 forks source link

Pre-compiled shared library to upload to LuaRocks #92

Open AndreMiras opened 1 year ago

AndreMiras commented 1 year ago

This is a feature request. It would be awesome if lua-cjson could be pre-compiled when published via LuaRocks. I mean so that the cjson.so was compiled and published for the different platforms. I'm new to Lua so I don't know how achievable it is, but I've done it a few times for Python, last time was for lru-dict. Basically the idea is to (cross-)compile the library for the different platform using the CI. I would be more than glad to help if I get some guidance. It could feel like a big task, but it doesn't have to be done all in one go. For instance we could start by shipping the library compiled for only a subset of platforms, like what we compile for in the test.yml and then keep adding platforms as we see fit. Uploading the rock to LuaRocks can also be automated via the CI so it happens upon tagging, I've done so in my very recent toy project (see publish.yml), maybe this is where we could start.