Skip to content

dist: publish to opm.openresty.org and add Windows CI #70

@membphis

Description

@membphis

Motivation

Two ecosystem expansion items that increase reach without changing core functionality:

1. OpenResty Package Manager (OPM)

lua-cjson is bundled with OpenResty and available on opm.openresty.org. qjson's primary benchmark target is OpenResty (the bench harness uses resty). Publishing to OPM lets OpenResty users install via:

opm get api7/lua-qjson

OPM requires an opm.json manifest. The main challenge: OPM packages are expected to be pure-Lua or include pre-built C modules. The Rust compilation step needs to either:

Suggested order: land pre-built binaries (Issue #68) first, then add OPM manifest pointing to the same assets.

2. Windows CI

The rockspec explicitly lists supported_platforms = { "linux", "macosx" }. lua-cjson runs on Windows (AppVeyor CI). qjson uses cdylib + dlopen via LuaJIT FFI — dlopen is unavailable on Windows; the equivalent is LoadLibrary.

Adding Windows support requires:

  • Verifying ffi.load("qjson") works on Windows LuaJIT (it uses LoadLibrary under the hood — LuaJIT FFI handles this transparently).
  • Building libqjson.dll in CI (cross-compile from Linux or native Windows runner).
  • Adding windows to supported_platforms in the rockspec.

This is lower priority than the other distribution items but would close the gap with lua-cjson's platform matrix.

Affected files

  • opm.json (new)
  • .github/workflows/ci.yml — add Windows job
  • rockspec/lua-qjson-*.rockspec — add windows to supported_platforms

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions