772618ef89
lua-cjson decodes straight onto the Lua stack, so a response costs its text plus the table it becomes rather than a document in between, and it brings the encode half that a C tokenizer would have left to write here. It is a module rather than a global: a global namespace is a contract a firmware implements, and nothing about this needs a provider. Registering into package.preload also puts it ahead of the SD-card searcher, so an implementation cannot be shadowed, and an app that never requires it never pays for the module. Depth is capped at 32 through the module's own knobs rather than by patching the vendored source. Decoding recurses on the C stack and upstream defaults to 1000, which assumes a server rather than a FreeRTOS task.
15 lines
314 B
JSON
15 lines
314 B
JSON
{
|
|
"name": "ESP32LuaAPI",
|
|
"version": "1.0.0",
|
|
"description": "Shared Lua runtime and app API for ESP32 firmware",
|
|
"build": {
|
|
"srcDir": "native/src",
|
|
"includeDir": "native/include",
|
|
"flags": [
|
|
"-DLUA_32BITS",
|
|
"-I native/src/vendor/lua",
|
|
"-I native/src/vendor/cjson"
|
|
]
|
|
}
|
|
}
|