2017-05-10 ruki
Introduction xmake lua has supported REPL(read-eval-print), we can write and test script more easily now. Enter interactive mode: ```bash $ xmake lua 1 + 2 3 a = 1 a 1 for _, v in pairs({1, 2, 3}) do print(v) end 1 2 3 ``` 继续阅读 »
2020-12-10 ruki
xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。 我们可以用 xmake 很方便的开发构建 C/C++ 项目,同时也支持和其他 native 语言的混合编译。 近期,我们还新增了一个基于 xmake 的独立子命令:xrepo,一个完整独立的跨平台 C/C++ 包管理器,便于用户更加方便的管理日常 C/C++ 包的安装和集成使用。 关于 xmake 和 xrepo 的进一步了解和使用可以参考下面的链接。 项目源码 继续阅读 »
2020-11-24 ruki
xmake is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a short time, allowing users to focus more on the actual projec 继续阅读 »
2017-01-07 ruki
We recently added a new feature for xmake: you need not write any make-like file (xmake.lua, makefile.am, cmakelist.txt, etc.) and also build it directly. It will scan all source files and generate xmake.lua automatically for building project. And xmake will detect 'main' function in source file in order to distin 继续阅读 »
2015-11-20 derekchan
今天在用Homebrew安装lua_nginx模块的时候,发现只能下好lua模块再来安装Nginx,而Nginx已经是装好的了,显然不适合这样安装(PS:不想删除),所以我用了重新编译的方法来为Nginx引入lua_nginx模块。 先下载好需要的安装包,这里我们安装lua5.1,5.2暂不支持nginx 继续阅读 »
2016-10-26 ruki
xmake的工程描述文件xmake.lua虽然基于lua语法,但是为了使得更加方便简洁得编写项目构建逻辑,xmake对其进行了一层封装,使得编写xmake.lua不会像些makefile那样繁琐 基本上写个简单的工程构建描述,只需三行就能搞定,例如: lua target("test") set_kind("binary") add_files("src/*.c") 然后只需要执行编译并且运行它: bash $ xmake run test 这对于想要临时写些测试代码来讲,极大地提升了开发效率。。 作用域与工程描述语法 xmake的描述语法是按作用域划分的,主要分为: 外部作用域 内部作用域 继续阅读 »
2016-07-18 ruki
最近在xmake中,用lua的协程实现了多任务编译,效果还是不错的,不过后来发现一个问题: 如果所有编译进程都在处理编译,没有退出的时候,xmake的lua主进程会不断地在这些任务间,不停的切换轮询进程的状态,但是有没有机会执行其他任务,导致cpu过高,抢占了编译进程的cpu时间。。 那如果在等不到完成的进程时候,加入sleep等待呢,又会导致编译速度变慢,没法合理利用cpu。。 因此,为了解决这个问题,我打算扩展下lua的接口,实现了一个跨平台的多进程等待接口: process.waitlist 实现多个未完成进程的同时等待,让出xmake主进程的cpu时间,给其他编译进程充分利用 xmake中的lua代码如下: ``` 继续阅读 »
2020-10-17 ruki
xmake is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a short time, allowing users to focus more on the actual projec 继续阅读 »
2017-08-10 ruki
之前的版本对编译控制粒度,只能到target这一级: ```lua -- 全局根配置,所有target都会被影响 add_defines("ROOT") target("test") -- target目标配置,只对test目标下的所有源文件编译生效 add_defines("TEST") add_files("src/*.c") ``` 最近给2.1.6开发版本中的add_files进行了改进,支持基于files更细粒度的编译选项控制,例如: lua target("test") add_defines("TEST1") add_files("src/*.c") add_files("test/* 继续阅读 »
2020-11-24 ruki
xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。 在这个新版本中,我们重点改进了 xmake 的依赖包管理,新增了 Archlinux 和 MSYS2/Mingw 下 的 pacman 包管理器支持,另外我们进一步丰富了 xmake 的官方包仓库 xmake-repo,新增了 50 多个常用的 C/C++ 包。 此外,我们新增了一个基于 xmake 的独立子命令:xrepo,一个完整独立的跨平台 C/C++ 包管理器,便于用 继续阅读 »