Skip to content

Commit

Permalink
Add document for luarocks-build-xmake and lua.native-objects (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu authored Dec 18, 2024
1 parent 88d4c9b commit 9a3c6a0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions guide/project_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,13 @@ target("hello")
add_files("src/main.c")
```
## Lua module
Refer <https://github.com/xmake-io/luarocks-build-xmake>
If your lua module contains C code, you can use [LuaNativeObjects](https://github.com/Neopallium/LuaNativeObjects) to generate C code from lua code.
Refer [example](https://github.com/Freed-Wu/rime.nvim/blob/main/xmake.lua).
## Linux kernel driver module
In version v2.6.2, xmake fully supports the construction of Linux kernel driver modules. This may be the first and only third-party build tool that supports compiling Linux kernel drivers.
Expand Down
8 changes: 8 additions & 0 deletions zh-cn/guide/project_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,14 @@ target("hello")
add_files("src/main.c")
```
## Lua 模块
参考 <https://github.com/xmake-io/luarocks-build-xmake>
如果你的 lua 模块含有 C 代码,你可以使用 [LuaNativeObjects](https://github.com/Neopallium/LuaNativeObjects) 去从 lua 代码生成 C 代码。
参考[例子](https://github.com/Freed-Wu/rime.nvim/blob/main/xmake.lua)。
## Lua
## Linux 内核驱动模块
v2.6.2 版本,xmake 完整支持了 Linux 内核驱动模块的构建,这也许首个也是唯一一个支持编译 Linux 内核驱动的第三方构建工具了。
Expand Down

0 comments on commit 9a3c6a0

Please sign in to comment.