News for hackers. Stuff that matters.
Re:Xmake: A cross-platform build utility based on Lua by lazypenguin on Thursday January 29, 2026 @06:12AM (#46808600)
A teammate evaluated this and the experience was night and day compared to cmake + vcpkg. However, there wasn’t a lot of motivation to cutover our existing large project over because of the unknown unknowns. I think projects like these looking to dethrone the status quo definitely need some case studies or examples of larger projects using it to increase confidence because I’d much rather use xmake over cmake if it can get the job done
Re:Xmake: A cross-platform build utility based on Lua by warmwaffles on Thursday January 29, 2026 @09:45AM (#46810850)
I use it for personal projects and I find it substantially easier to mess around with compiling shaders to SPIRV, processing assets, etc... But some of my gripes are, although it _is_ lua, there is some magic fuckery going on. When you specify targets, things for that target need to be close to the definition, and it feels very odd in a lua language to not have `target("name", function (ctx) ... end)`.

Anyways, not going to die on that hill and I'll keep using it because it's simple and works well for my needs. One thing I do like is that I am not having to constantly keep a skeleton CMake project around to copy paste and setup.

Re:Xmake: A cross-platform build utility based on Lua by danny0z on Thursday January 29, 2026 @09:53AM (#46810977)
> not have `target("name", function (ctx) ... end)`.

It supports this syntax.

https://xmake.io/guide/project-configuration/syntax-descript...

  target("foo", function ()
      set_kind("binary")
      add_files("src/*.cpp")
      add_defines("FOO")
  end)
Re:Xmake: A cross-platform build utility based on Lua by numeromancer on Thursday January 29, 2026 @11:01AM (#46811982)
I think the creators did it a disservice to xmake when they tried to unluaize the syntax. You can also do:

    target("foo", {
      kind = "binary",
      files = { "src/*.cpp" },
      includedirs = { "src" },
      defines = { "FOO", "BAR=BAZ" },
    })
which suits Lua better. Unfortunately you cannot do

    target {
      name = "foo",
      kind = "binary",
      files = { "src/*.cpp" },
      includedirs = { "src" },
      defines = { "FOO", "BAR=BAZ" },
    }
which would be the lua-est lua of all.
Re:Xmake: A cross-platform build utility based on Lua by danny0z on Thursday January 29, 2026 @11:09AM (#46812138)
It also supports this syntax.

    target("foo", {
      kind = "binary",
      files = { "src/*.cpp" },
      includedirs = { "src" },
      defines = { "FOO", "BAR=BAZ" },
    })
https://xmake.io/guide/project-configuration/syntax-descript...
Re:Xmake: A cross-platform build utility based on Lua by numeromancer on Thursday January 29, 2026 @11:23AM (#46812358)
That's what I meant: the first you can do, the second, not.
Re:Xmake: A cross-platform build utility based on Lua by warmwaffles on Thursday January 29, 2026 @09:59AM (#46811068)
I did not spot those in the docs. Thanks a ton. This will help my autoformatter not completely wreck my files.