What does HackerNews think of samurai?

ninja-compatible build tool written in C

Language: C

#1 in Docker
Samurai is a faster, drop-in replacement for ninja.

https://github.com/michaelforney/samurai

Edit: It someone writes a ninja-compatible tool in Rust, they must call it "ronin."

"If you want to do what "scrappy Google" did these days, then you should use Python + Ninja."

Or, better yet, use a faster^1 and more portable Ninja-compatible build utility written in C99.

https://github.com/michaelforney/samurai

1. YMMV

and we should not forget about the simple C (C99) re-implementation of ninja from M. Forney:

https://github.com/michaelforney/samurai

Why is Python not portable, as in, on which systems is "build Python and then use that to run Meson" not a reasonable option?

The CI for boson seems like it runs on platforms where Python definitely is available, but also I notice the CI uses samurai, a reimplementation of ninja with a similar motivation: https://github.com/michaelforney/samurai

Ninja is in C++ so I am even more confused at Sanurai.

Is this just an implementation-diversity thing? (which is great!)

You could probably post-process samurai (a rewrite of ninja into C) into a single-file: https://github.com/michaelforney/samurai
Me, out loud: "Awwww! What cute site!" I am not ashamed.

It's like a lil mini haiku OS (not to be confused with HaikuOS the open BeOS).

- - - -

Ooo!

https://github.com/michaelforney/samurai

> samurai is a ninja-compatible build tool written in C99 with a focus on simplicity, speed, and portability.

I found samurai and it is indeed tiny! ~3400 lines was less than I was expecting for *.[ch] !

https://github.com/michaelforney/samurai

Ninja isn't too big though. It looks like about 13K of non-test code, which is great for a mature and popular project. Punting build logic to a higher layer seems to have been a big win :)