{"id":18620460,"url":"https://github.com/jason-gao/luausing","last_synced_at":"2025-07-29T11:34:20.215Z","repository":{"id":90733513,"uuid":"192486935","full_name":"jason-gao/luaUsing","owner":"jason-gao","description":"lua practice","archived":false,"fork":false,"pushed_at":"2019-07-02T08:25:43.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-10T08:41:25.743Z","etag":null,"topics":["ffi","lua","luajit"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jason-gao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-18T07:17:19.000Z","updated_at":"2019-07-02T08:25:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebd8c07f-d88e-49b3-989f-c4a9d6e260e1","html_url":"https://github.com/jason-gao/luaUsing","commit_stats":{"total_commits":15,"total_committers":3,"mean_commits":5.0,"dds":"0.33333333333333337","last_synced_commit":"9baa17da6ee7e0f982463dd6cec8995ea48f9de2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jason-gao/luaUsing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-gao%2FluaUsing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-gao%2FluaUsing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-gao%2FluaUsing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-gao%2FluaUsing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jason-gao","download_url":"https://codeload.github.com/jason-gao/luaUsing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-gao%2FluaUsing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267678448,"owners_count":24126333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ffi","lua","luajit"],"created_at":"2024-11-07T04:06:15.665Z","updated_at":"2025-07-29T11:34:20.190Z","avatar_url":"https://github.com/jason-gao.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# env\n- macos mojave 10.14.4 (18E226)\n- vs code 版本 1.35.1 (1.35.1) \n- vs code 默认不是自动保存，file-auto save 打开，否则 lua xx.lua 啥也不输出，别被坑哭～～\n- lua version 5.3.5\n- luajit 2.0.5 兼容lua5.1\n\n\n\n\n# install\nbrew install lua\n\n# doc\n- https://moonbingbing.gitbooks.io/openresty-best-practices/lua/for.html\n- https://www.kancloud.cn/thinkphp/lua-guide/43810\n- https://wiki.jikexueyuan.com/project/lua/overview.html\n- https://aillieo.cn/post/2018-06-24-lua-notes-02/\n- https://luarocks.org/\n- http://luajit.org/ext_ffi_api.html\n- lua-resty开头的库是跑在nginx里的,lua-*开头的是通用的，像lua-cjson这种只要是lua就能跑\n- 单独用的话要用ffi.load手动加载openssl库\n- luajit自带ffi\n\n\n# luaUsing\n- lua demo.lua\n\n# kong 插件开发\n- https://ms2008.github.io/2018/06/19/kong-plugin-development/\n\n\n# 兼容性\n\n```lua\n\n-- Provide unpack for Lua 5.3+ built without LUA_COMPAT_UNPACK\nlocal unpack = unpack\nif table.unpack then unpack = table.unpack end\n\n\n```\n\n- luarocks\n- brew install luarocks\n- luarocks install luacrypto OPENSSL_DIR=/usr/local/Cellar/openssl/1.0.2r\n\n```text\nbrew upgrade openssl\nIf you need to have curl-openssl first in your PATH run:\n  echo 'export PATH=\"/usr/local/opt/curl-openssl/bin:$PATH\"' \u003e\u003e ~/.bash_profile\n\nFor compilers to find curl-openssl you may need to set:\n  export LDFLAGS=\"-L/usr/local/opt/curl-openssl/lib\"\n  export CPPFLAGS=\"-I/usr/local/opt/curl-openssl/include\"\n\nFor pkg-config to find curl-openssl you may need to set:\n  export PKG_CONFIG_PATH=\"/usr/local/opt/curl-openssl/lib/pkgconfig\"\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjason-gao%2Fluausing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjason-gao%2Fluausing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjason-gao%2Fluausing/lists"}