{"id":20564538,"url":"https://github.com/tarantool/modulekit","last_synced_at":"2026-03-17T15:11:33.837Z","repository":{"id":46172226,"uuid":"42595942","full_name":"tarantool/modulekit","owner":"tarantool","description":"modulekit - A set of Tarantool module templates","archived":false,"fork":false,"pushed_at":"2021-11-09T08:09:33.000Z","size":46,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":33,"default_branch":"luakit","last_synced_at":"2025-04-14T15:12:59.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarantool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-16T15:28:20.000Z","updated_at":"2023-03-16T15:17:42.000Z","dependencies_parsed_at":"2022-09-09T13:11:03.905Z","dependency_job_id":null,"html_url":"https://github.com/tarantool/modulekit","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fmodulekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fmodulekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fmodulekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fmodulekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarantool","download_url":"https://codeload.github.com/tarantool/modulekit/tar.gz/refs/heads/luakit","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904637,"owners_count":21180835,"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","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":[],"created_at":"2024-11-16T04:27:35.101Z","updated_at":"2026-03-17T15:11:33.802Z","avatar_url":"https://github.com/tarantool.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"http://tarantool.org\"\u003e\n\t\u003cimg src=\"https://avatars2.githubusercontent.com/u/2344919?v=2\u0026s=250\" align=\"right\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://travis-ci.org/tarantool/modulekit\"\u003e\n\t\u003cimg src=\"https://travis-ci.org/tarantool/modulekit.png?branch=luakit\" align=\"right\"\u003e\n\u003c/a\u003e\n\n# Lua module template for Tarantool 1.6+\n\nUse this template to create and publish a [Tarantool][] module written in pure\nLua.\n\n**Note:** If you write a Tarantool module in C, see the [ckit][Ckit] branch of\nthis repository.\n\n## Table of contents\n* [Kit content](#kit-content)\n* [Prerequisites](#prerequisites)\n* [Examples](#examples)\n* [See also](#see-also)\n\n## Kit content\n\n  * `./README.md` - this file\n  * `./luakit/init.lua` - the Lua module itself, loaded with `require('luakit')`\n  * `./luakit-scm-1.rockspec` - a specification for the\n    [tarantool/rocks][TarantoolRocks] repository\n  * `./test/luakit.test.lua` - tests for the module\n  * `./rpm/` - files to build an RPM package\n  * `./debian/` - files to build a DEB package\n\n## Prerequisites\n\nTarantool 1.6.8+ with header files (`tarantool` and `tarantool-dev` packages)\n\n## Usage\n\n1. Clone this repository.\n\n   ```bash\n   git clone https://github.com/tarantool/modulekit.git\n   ```\n   \n   The default branch is `luakit`, which is what you need for a module in pure\n   Lua.\n\n2. Rename all files to use your favorite name.\n\n   For example, `mymodule`:\n\n    ```bash\n    grep -R luakit .\n    mv luakit/ mymodule/\n    mv test/luakit.test.lua test/mymodule.test.lua\n    ...\n    ```\n\n3. Implement your code in `./mymodule/`.\n\n   You will have one or more Lua modules that export their functions for\n   API calls.\n\n   As an example, see the Lua module [luakit/init.lua][LuaModule] from the\n   `luakit` package. Here we have one internal function (`test()`), and we\n   export it as `test` for API calls.\n   \n   As a result, after we publish the `luakit` package in step 7, Tarantool\n   users will be able to load the package and call the function `test()` with\n   `require('luakit').test(arg)`.\n   \n   **Note:** The basics of [creating a Lua module][CreateLuaModule] for\n   Tarantool are explained in the Tarantool manual.\n\n4. Add tests to `./test/mymodule.test.lua`:\n\n    ```bash\n    prove -v ./test/luakit.test.lua or ./test/luakit.test.lua\n    ```\n\n5. Update copyright and README files.\n\n6. Push all files except `rpm/`, `debian/` and `mymodule-scm-1.rockspec`.\n\n7. Update and check the rockspec.\n    \n   A `.rockspec` file wraps a module into a package. This is what you can\n   publish. If you are new to Lua rocks, see general information on rockspec \n   [format][RockSpecFormat] and [creation][RockSpecCreation].\n   \n   Your rockspec must comply with [these requirements][Requirements]\n   and allow to build and install your package locally:\n\n    ```bash\n    luarocks install --local mymodule-scm-1.rockspec\n    ```\n    \n    See an annotated rockspec example in [luakit-scm-1.rockspec][LuaRockSpec].\n\n8. Push your rockspec and make a pull request to the\n   [tarantool/rocks][TarantoolRocks] repository.\n   \n   The Tarantool team will review the request and decide on including your\n   package in [Tarantool rocks list][TarantoolRocksList] and \n   [official Tarantool images for Docker][TarantoolDocker].\n\n9. [Optional] Check DEB packaging and push `debian/` to GitHub.\n\n    ```bash\n    dpkg-buildpackage -D -b -us -uc\n    ls -l ../*.deb\n    ```\n\n10. [Optional] Check RPM packaging and push `rpm/` to GitHub.\n\n    ```bash\n    tar cvzf ~/rpmbuild/SOURCES/tarantool-mymodule-1.0.0.tar.gz\n    rpmbuild -b rpm/tarantool-mymodule.spec\n    ```\n\nEnjoy! Thank you for contributing to Tarantool.\n\n## Examples\n\n * [Lua module example](http://github.com/tarantool/queue)\n * [One more Lua module example](http://github.com/tarantool/gperftools)\n\n## See also\n\n * [Tarantool/Lua API Reference][TarantoolLuaReference]\n * [Modulekit for Tarantool modules in C][Ckit]\n\n[Tarantool]: http://github.com/tarantool/tarantool\n[Download]: http://tarantool.org/download.html\n[Requirements]: http://github.com/tarantool/rocks#contributing\n[RockSpecFormat]: http://github.com/keplerproject/luarocks/wiki/Rockspec-format\n[RockSpecCreation]: http://github.com/luarocks/luarocks/wiki/Creating-a-rock\n[LuaCReference]: http://pgl.yoyo.org/luai/i/_\n[TarantoolLuaReference]: http://tarantool.org/doc/reference/index.html\n[TarantoolCReference]: http://tarantool.org/doc/reference/capi.html\n[TarantoolRocks]: http://github.com/tarantool/rocks\n[TarantoolRocksList]: http://tarantool.org/en/download/rocks.html\n[TarantoolDocker]: http://github.com/tarantool/docker\n[Luakit]: http://github.com/tarantool/modulekit/tree/luakit\n[Ckit]: http://github.com/tarantool/modulekit/tree/ckit\n[LuaModule]: http://github.com/tarantool/modulekit/blob/luakit/luakit/init.lua\n[CModule]: http://github.com/tarantool/modulekit/blob/ckit/ckit/lib.c\n[LuaCModule]: http://github.com/tarantool/modulekit/blob/ckit/ckit/init.lua\n[LuaRockSpec]: http://github.com/tarantool/modulekit/blob/luakit/luakit-scm-1.rockspec\n[CRockSpec]: http://github.com/tarantool/modulekit/blob/ckit/ckit-scm-1.rockspec\n[CreateLuaModule]: http://tarantool.org/en/doc/book/app_server/creating_app.html#modules-rocks-and-applications\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarantool%2Fmodulekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarantool%2Fmodulekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarantool%2Fmodulekit/lists"}