frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Xmake: A cross-platform build utility based on Lua

https://xmake.io/
87•phmx•1w ago

Comments

MobiusHorizons•1w ago
I think a syntax example on the homepage would be a good idea. Also comparison charts for things like cmake, ninja, meson, and bazel. If you have a dependency finding strategy, highlight the pros and cons of that. Basically the only reason states for why I should use this is lua, and that’s not inherently compelling to me for build tooling.
ash-b-dev•1w ago
100%. After going through the documentation, it’s definitely something I’d use, but the homepage presents Lua as the main selling point, and the AI button makes me not want to interact with it at all.
wsve•1w ago
At my work we use MSBuild and vcpkg. What would a transition from that to XMake be like?
janjones•1w ago
Then you are already using XMake (albeit a different one than OP), it's the original codename for MSBuild, still present in the code: https://github.com/dotnet/msbuild/blob/main/src/MSBuild/XMak... :)
debugnik•1w ago
Your phrasing could confuse readers: MSBuild happened to historically have XMake as a codename but is entirely unrelated to the build system known as XMake.
janjones•1w ago
Clarified my comment a bit, thanks
pjmlp•1w ago
As far as I am aware, there no integrations available with Visual Studio, and not sure about C++20 modules and import std support.
delta_p_delta_x•1w ago
> not sure about C++20 modules and import std support

XMake supports both.

danny0z•1w ago
It can generate a Visual Studio project, then use the xmake CLI to integrate and compile the project, and supports debugging and IntelliSense.

https://xmake.io/guide/extensions/builtin-plugins.html#gener...

C++ Modules examples:

https://xmake.io/examples/cpp/cxx-modules.html

https://github.com/xmake-io/xmake/tree/dev/tests/projects/c%...

pjmlp•1w ago
Thanks for the information.
ziotom78•1w ago
A few weeks ago I decided to test C++ modules, but I had a hard time to figure out how to make them accepted by CMake. After a few days of struggle with `set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "d0edc3af-4c50-42ea-a356-e2862fe7a444")` (it was so hard to find the right UUID that worked with my version) and errors on `import std;`, I decided to give XMake a chance.

It took just a couple of minutes to have a working example that fully supported C++ modules and `import std`:

    set_languages("c++23")

    add_rules("mode.debug", "mode.release")

    target("mytest")
        set_kind("static")
        add_files("src/*.cpp")
        add_files("src/*.cppm", {public = true})
        set_policy("build.c++.modules", true)
IshKebab•1w ago
My work uses this and it's slooooooow. Would not recommend.
elitepleb•1w ago
the command file generator is usually last to blame for a slow compile, making it output a cmake/ninja/make project would not speed up a poorly structured compilation tree at all
junon•1w ago
I don't believe xmake is a command file generator, is it?
elitepleb•1w ago
it has a feature to output such files, see https://github.com/xmake-io/xmake?tab=readme-ov-file#generat...
willaaaaaaa•1w ago
is that so? my experience's quite good
warmwaffles•1w ago
It's fast. I don't know if they are conflating the actual compiler being slow with xmake executing it.
skavi•1w ago
Just yesterday someone was telling me xmake does a lot of what bazel can do (hermetic, deterministic, optionally remote builds) while being easier to use.

I took a look at the docs later and couldn’t find a direct comparison. But there does seem to be a remote build system. And there were a few mentions of sandboxing.

Can anyone provide a head to head comparison?

Does xmake strictly enforce declared dependencies? Do actions run in their own sandboxes?

Can you define a target whose dependency tree is multi language, multi toolchain, multi target platform and which is built across multiple remote execution servers?

richrichardsson•1w ago
I apologise for this:

What's wrong with premake which is also Lua based?

when I meant:

What advantage does this have over premake which is also Lua based?

rienbdj•1w ago
What’s wrong with xmake which is also Lua based?
gjvc•1w ago
https://news.ycombinator.com/item?id=46511599 similar reasoning
richrichardsson•1w ago
I honestly didn't mean it like that, but I can understand that it comes across that way.

A better wording would be "what advantage does this have over premake which is also Lua based".

nottorp•1w ago
Tbh, why does it matter what it's written in? Does it do the job?
MobiusHorizons•1w ago
Lua is the syntax in the build configuration file, not how the tool is implemented internally. It’s part of the developer experience.
fsw•1w ago
For one, the last official stable release of premake is from 2010.
rienbdj•1w ago
Can anyone explain xmake in terms of Build Systems a la Carte?
lazypenguin•1w ago
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
warmwaffles•1w ago
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.

danny0z•1w ago
> 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)
warmwaffles•1w ago
I did not spot those in the docs. Thanks a ton. This will help my autoformatter not completely wreck my files.
numeromancer•1w ago
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.
danny0z•1w ago
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...
numeromancer•1w ago
That's what I meant: the first you can do, the second, not.
rhet0rica•1w ago
I am deeply distressed that this doesn't require Xlib.
nvlled•1w ago
Why? I'm so confused why would you expect a build tool to depend on a x11 client library, besides the fact that both starts with the letter x. Does it also upset you that xamarin and xaml has nothing to do with xlib, xmake, or to each other?
einpoklum•1w ago
So, digging through the website git repo a bit, some basic facts:

* The project started almost 11 years ago, in 2015.

* It can be both a build-system generator like CMake, or a 'builder' like Make or ninja.

* Code is almost exclusively by one person, waruqi: https://github.com/waruqi , with several other people making a few contribution.

* Prima facie, the API seems to be less flexible/rich than CMake's, but I'm not sure.

* It supports quite a few languages, despite saying "C/C++" on the website.

* It has a built-in REPL.

As @MobiusHorizons points out, a comparison with other build system generators would be appropriate, mostly CMake, but I did not find it.

Rochus•1w ago
This is an interesting system that I studied closely a few years ago, along with a few others based on Lua or Python.

What surprises me enormously about all these systems is the fact that, in builds that can become enormously large and complex systems in themselves, we voluntarily forego most of the advantages we have learned over sixty years of software engineering. I am thinking, for example, of strong typing and type checking by the compiler, which then also enables better support from IDEs and analysis or visualization tools.

It's kind of like other scripting languages. For small applications, it all looks practical and efficient, but woe betide it if it becomes as big as Qt or other systems with several hundred thousand lines of code.

mrlonglong•1w ago
https://xkcd.com/927/

We have so many build utilities out there.

Jim Fan calls pixels the ultimate motor controller

https://robotsandstartups.substack.com/p/humanoids-platform-urdf-kitchen-nvidias
1•robotlaunch•3m ago•0 comments

Exploring a Modern SMTPE 2110 Broadcast Truck with My Dad

https://www.jeffgeerling.com/blog/2026/exploring-a-modern-smpte-2110-broadcast-truck-with-my-dad/
1•HotGarbage•3m ago•0 comments

AI UX Playground: Real-world examples of AI interaction design

https://www.aiuxplayground.com/
1•javiercr•4m ago•0 comments

The Field Guide to Design Futures

https://designfutures.guide/
1•andyjohnson0•4m ago•0 comments

The Other Leverage in Software and AI

https://tomtunguz.com/the-other-leverage-in-software-and-ai/
1•gmays•6m ago•0 comments

AUR malware scanner written in Rust

https://github.com/Sohimaster/traur
3•sohimaster•8m ago•1 comments

Free FFmpeg API [video]

https://www.youtube.com/watch?v=6RAuSVa4MLI
3•harshalone•8m ago•1 comments

Are AI agents ready for the workplace? A new benchmark raises doubts

https://techcrunch.com/2026/01/22/are-ai-agents-ready-for-the-workplace-a-new-benchmark-raises-do...
2•PaulHoule•13m ago•0 comments

Show HN: AI Watermark and Stego Scanner

https://ulrischa.github.io/AIWatermarkDetector/
1•ulrischa•14m ago•0 comments

Clarity vs. complexity: the invisible work of subtraction

https://www.alexscamp.com/p/clarity-vs-complexity-the-invisible
1•dovhyi•15m ago•0 comments

Solid-State Freezer Needs No Refrigerants

https://spectrum.ieee.org/subzero-elastocaloric-cooling
1•Brajeshwar•15m ago•0 comments

Ask HN: Will LLMs/AI Decrease Human Intelligence and Make Expertise a Commodity?

1•mc-0•16m ago•1 comments

From Zero to Hero: A Brief Introduction to Spring Boot

https://jcob-sikorski.github.io/me/writing/from-zero-to-hello-world-spring-boot
1•jcob_sikorski•17m ago•1 comments

NSA detected phone call between foreign intelligence and person close to Trump

https://www.theguardian.com/us-news/2026/feb/07/nsa-foreign-intelligence-trump-whistleblower
7•c420•17m ago•1 comments

How to Fake a Robotics Result

https://itcanthink.substack.com/p/how-to-fake-a-robotics-result
1•ai_critic•18m ago•0 comments

It's time for the world to boycott the US

https://www.aljazeera.com/opinions/2026/2/5/its-time-for-the-world-to-boycott-the-us
3•HotGarbage•18m ago•0 comments

Show HN: Semantic Search for terminal commands in the Browser (No Back end)

https://jslambda.github.io/tldr-vsearch/
1•jslambda•18m ago•1 comments

The AI CEO Experiment

https://yukicapital.com/blog/the-ai-ceo-experiment/
2•romainsimon•20m ago•0 comments

Speed up responses with fast mode

https://code.claude.com/docs/en/fast-mode
3•surprisetalk•23m ago•0 comments

MS-DOS game copy protection and cracks

https://www.dosdays.co.uk/topics/game_cracks.php
3•TheCraiggers•24m ago•0 comments

Updates on GNU/Hurd progress [video]

https://fosdem.org/2026/schedule/event/7FZXHF-updates_on_gnuhurd_progress_rump_drivers_64bit_smp_...
2•birdculture•25m ago•0 comments

Epstein took a photo of his 2015 dinner with Zuckerberg and Musk

https://xcancel.com/search?f=tweets&q=davenewworld_2%2Fstatus%2F2020128223850316274
12•doener•25m ago•2 comments

MyFlames: View MySQL execution plans as interactive FlameGraphs and BarCharts

https://github.com/vgrippa/myflames
1•tanelpoder•27m ago•0 comments

Show HN: LLM of Babel

https://clairefro.github.io/llm-of-babel/
1•marjipan200•27m ago•0 comments

A modern iperf3 alternative with a live TUI, multi-client server, QUIC support

https://github.com/lance0/xfr
3•tanelpoder•28m ago•0 comments

Famfamfam Silk icons – also with CSS spritesheet

https://github.com/legacy-icons/famfamfam-silk
1•thunderbong•29m ago•0 comments

Apple is the only Big Tech company whose capex declined last quarter

https://sherwood.news/tech/apple-is-the-only-big-tech-company-whose-capex-declined-last-quarter/
4•elsewhen•32m ago•0 comments

Reverse-Engineering Raiders of the Lost Ark for the Atari 2600

https://github.com/joshuanwalker/Raiders2600
2•todsacerdoti•33m ago•0 comments

Show HN: Deterministic NDJSON audit logs – v1.2 update (structural gaps)

https://github.com/yupme-bot/kernel-ndjson-proofs
1•Slaine•37m ago•0 comments

The Greater Copenhagen Region could be your friend's next career move

https://www.greatercphregion.com/friend-recruiter-program
2•mooreds•37m ago•0 comments