TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Xmake: A cross-platform build utility based on Lua

193 点作者 flexagoon大约 1 年前

22 条评论

pcranaway大约 1 年前
I started using xmake a few days ago. Not sure if I will use it for new projects (due to CMake being the standard) but I definitely want to. The workflow is amazing and super fast. You just run `xmake create` and it creates your project. Then you can just run xmake and boom, it compiles it in an instant, linking dependencies, without needing to create a CMakeLists.txt, adding a submodule for every dependency you use, including your dependency's cmake file, blah blah (xmake has its own xrepo tool which allows for dependency management in a MUCH easier way)
评论 #40263342 未加载
评论 #40263985 未加载
评论 #40263241 未加载
jokoon大约 1 年前
Can it build a C++ SFML application on windows?<p>I am now annoyed by the claims of those build systems. My own experience is using a visual studio project manually, and writing classic makefile for linux. Those are things I can&#x27;t avoid learning.<p>The root of the problem is that windows&#x2F;unix do things differently, but that doesn&#x27;t change anyone&#x27;s understanding of how a compiler&#x2F;linker works.<p>I am against those build system: I need to learn how to use them, and I need to understand how they manage to &quot;reunite&quot; different toolchains.<p>Generally, I would guess I spend less time building something on each system with either visual studio&#x2F;makefiles, than using a meta-build system.<p>Microsoft is at fault for making things differently, of course, but attempts to reunite platforms are often quite misguided<p>Of course, people who write libraries need those build systems, obviously, although I don&#x27;t know what any other build system does better than CMake.
评论 #40263687 未加载
评论 #40264059 未加载
mirekrusin大约 1 年前
Isn&#x27;t zig good tool for this as well? I&#x27;ve seen it being used in passing [0] - is this reasonable thing to do and we may see more of it?<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;ggerganov&#x2F;llama.cpp&#x2F;blob&#x2F;master&#x2F;build.zig">https:&#x2F;&#x2F;github.com&#x2F;ggerganov&#x2F;llama.cpp&#x2F;blob&#x2F;master&#x2F;build.zig</a>
评论 #40264406 未加载
评论 #40265679 未加载
qwerty456127大约 1 年前
I&#x27;ve been always wondering why do we even need specialized build tools and why does the community around every new programming language or framework feel obliged to invent their own, implemented in their native language. Why can&#x27;t we just write a script in Python or any other scripting language which would fetch the deps, invoke the compilers, run the tests and spit out the package?<p>I can&#x27;t answer myself because I only have basic theoretical idea of what build tools do, I have always mostly been using IDEs like VisualStudio which do everything behind the scenes in a press of a button.
评论 #40265519 未加载
评论 #40265331 未加载
评论 #40266495 未加载
评论 #40264467 未加载
评论 #40264788 未加载
评论 #40265797 未加载
评论 #40264976 未加载
评论 #40264777 未加载
d99kris大约 1 年前
Xmake gets posted here once in a while, here are some previous discussions:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19610459">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19610459</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22583147">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22583147</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30696061">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30696061</a>
评论 #40263848 未加载
padde大约 1 年前
Does it scale for large monorepos? That&#x27;s where CMake hits its limits. With tremendous effort we switched to Bazel, which has brought down configure+build times to less than 1&#x2F;10.
评论 #40263712 未加载
blacklion大约 1 年前
Space of software projects&#x27; names are so limited...<p>There is (was) xmake already: build tool used by XFree86&#x2F;x.org before x.org modularization. It was very good, much better than auto*-tools, but didn&#x27;t get enough traction outside XFree86 project.
评论 #40264248 未加载
stefanos82大约 1 年前
For a brief moment I thought it was about Premake [1] under a different name, but after checking xmake&#x27;s Discussions [2] I have found the answer I was looking for.<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Premake" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Premake</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;xmake-io&#x2F;xmake&#x2F;discussions&#x2F;1863">https:&#x2F;&#x2F;github.com&#x2F;xmake-io&#x2F;xmake&#x2F;discussions&#x2F;1863</a>
blacklion大约 1 年前
I&#x27;m sorry, I cannot treat seriously project with these installation instructions:<p>--- curl -fsSL <a href="https:&#x2F;&#x2F;xmake.io&#x2F;shget.text" rel="nofollow">https:&#x2F;&#x2F;xmake.io&#x2F;shget.text</a> | bash ---<p>System packet manager? What is it? Never heard about it.<p>It is like copying &quot;src&quot; directory to new name with each change in sources instead using version control system.
评论 #40264273 未加载
评论 #40268037 未加载
评论 #40264303 未加载
codedokode大约 1 年前
It seems that C developers tend to use Turing-complete scripts for building instead of a declarative language. Using scripts means that build configuration cannot be processed by automated tools for extraction of information or modification. Why don&#x27;t you want to use declarative build configuration?
评论 #40265914 未加载
评论 #40268780 未加载
评论 #40276513 未加载
robxorb大约 1 年前
Looks very full-featured, surprised I haven&#x27;t heard of it. Might finally realise simple (Apple-based) command-line builds for macOS&#x2F;iOS:<p><a href="https:&#x2F;&#x2F;xmake.io&#x2F;#&#x2F;guide&#x2F;project_examples?id=iosmacos-program" rel="nofollow">https:&#x2F;&#x2F;xmake.io&#x2F;#&#x2F;guide&#x2F;project_examples?id=iosmacos-progra...</a><p>Including signing. It still relies on xcode of course, but if you don&#x27;t actually need to <i>use</i> xcode to configure or build, that&#x27;s a big plus.
emmanueloga_大约 1 年前
re: C&#x2F;C++ development: anybody using conda&#x2F;pixi for dependency management? Here&#x27;s an example of compiling a C++ SDL program using pixi and the SDL dependency from conda-forge [1].<p>Seems viable as a replacement for things like vckpg [2] which only builds from source.<p>I&#x27;m still researching this but it seems like rattler [3] is the tool to use to build&#x2F;publish packages. The supported repos are: prefix.dev&#x27;s own hosting, anaconda.org, artifactory or a self-hosted server.<p>--<p>1: <a href="https:&#x2F;&#x2F;github.com&#x2F;prefix-dev&#x2F;pixi&#x2F;blob&#x2F;main&#x2F;examples&#x2F;cpp-sdl&#x2F;pixi.toml#L15">https:&#x2F;&#x2F;github.com&#x2F;prefix-dev&#x2F;pixi&#x2F;blob&#x2F;main&#x2F;examples&#x2F;cpp-sd...</a><p>2: <a href="https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;vcpkg">https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;vcpkg</a><p>3: <a href="https:&#x2F;&#x2F;prefix-dev.github.io&#x2F;rattler-build&#x2F;latest&#x2F;authentication_and_upload&#x2F;#uploading-packages" rel="nofollow">https:&#x2F;&#x2F;prefix-dev.github.io&#x2F;rattler-build&#x2F;latest&#x2F;authentica...</a>
coffeeaddict1大约 1 年前
&gt; Supports C++ modules (new in C++20).<p>Hmm, interesting. Has anyone tested this and seen how it compares against CMake&#x27;s latest versions?
评论 #40264840 未加载
评论 #40264093 未加载
wffurr大约 1 年前
Looks pretty neat. Probably a lot easier to use than Bazel, unless you need to compile C++ and Java or TypeScript, e.g. for building Android or web apps with a native dependency all from source.
doubloon大约 1 年前
please explain how you can truly support something like 40<i>40</i>20 different OS, architecture, toolchain, and programming languages without automated regression testing every single one of them. and then please tell me what system can run this testing because i would love to see that.
WhereIsTheTruth大约 1 年前
If I were to still use C&#x2F;C++, i&#x27;d definitely use xmake, without hesitating<p>I wish more people would embrace it over cmake, I despise cmake so much..<p>I fully moved to D however, the experience here is night and day, the module system alone makes me not miss C&#x2F;C++, at all
评论 #40264523 未加载
mid-kid大约 1 年前
I&#x27;ve seen this one around but not seen anyone use it. What are its advantages over something like meson?
评论 #40263887 未加载
ykonstant大约 1 年前
This is genuinely interesting; any experts care to compare the functionality with more standard tools?
bfrog大约 1 年前
sadly so much is tied into cmake with all its eccentricities of being a weird custom macro language, hard to see using anything besides cmake unless I stop using C
Xeamek大约 1 年前
Damn, looks pretty nice, will definitely give it a shot
jgarzik大约 1 年前
Gotta be That Guy:<p>Some of the wisdom from the recent XZ backdoor incident was that cmake was a contributing factor, due to its internal complexity.<p>Some of the current trend is to <i>strip out autotools and cmake</i>, and go back to the basics, because modern OS support is a subset of what was relevant 20 years ago.
评论 #40276475 未加载
tgz大约 1 年前
Is this another attempt to make a tool like a rust&#x27;s cargo for c++?