# test-luarocks-build-rust-mlua **Repository Path**: jinq0123/test-luarocks-build-rust-mlua ## Basic Information - **Project Name**: test-luarocks-build-rust-mlua - **Description**: Test lua module written in Rust mlua and built with luarocks-build-rust-mlua. - **Primary Language**: Rust - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-07-29 - **Last Updated**: 2023-07-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # test-luarocks-build-rust-mlua Test lua module written in Rust mlua and built with luarocks-build-rust-mlua. [mlua]: https://crates.io/crates/mlua [lua-ryaml]: https://github.com/khvzak/lua-ryaml ## Steps 1. Follow the module mode example of [mlua] + Remove the "vendored" feature of mlua which is not supported on Windows 1. Add featurs like [lua-ryaml]'s Cargo.toml + Remove the "lua54" feature of mlua 1. Copy [lua-ryaml]'s `.cargo/config` 1. Write a rockspec file as [lua-ryaml] * Run `luarocks make` to compile and install 1. Upload rockspec and tag a release in Git 1. Test luarocks install ## Add sync test Follow the example of `create_async_function()`: * Add sleep_ms() function * Export sleep_ms * Add mlua feature "async" Reference: * https://github.com/khvzak/mlua/issues/76 * https://github.com/khvzak/mlua/issues/72 * https://github.com/nvim-lua/plenary.nvim/issues/252