Hacker News new | ask | show | jobs
by forrestthewoods 24 days ago
The world has yet to standardize on a good crossplatform polyglot build system.

The only real such build systems are Buck and Bazel. But they have way too much baggage from their overlords.

It’s a shame.

2 comments

Zig is pretty good for my use case. It may not be fully pollyglot at a technical level, but I can use it for my embedded C use case, for Jank to export the .cpp to other platforms, and thereby Clojure.
build systems using llvm as the backend are getting there, but zig is making their own compiler too.
compilers and build systems are and should be different.

A good polyglot build system should support llvm and zig and python and literally any toolchain under the sun.

the problem is that you need a compiler capable of compiling said zig, python, rust. LLVM does that, you can compile something as untyped as javascript(with a lot of hacks) or as strict as rust.
> the problem is that you need a compiler capable of compiling said zig, python, rust

no! No you do not!!

It’s perfectly totally fine to have multiple different compilers. Literally not a problem at all. That’s my point!

Compilers and build systems are separate. It is perfectly fine for one build system to invoke multiple different compilers.

cargo pretty much does that, but then you have to have to bundle all those compilers which becomes a fuckfest.
Ehh. Cargo has build.rs but calling that a polyglot build system is like calling bash scripts a polyglot build system.

Buck and Bazel have the right architecture. Just need a version written fresh without all the baggage.