• Stars
    star
    819
  • Rank 55,659 (Top 2 %)
  • Language
    C
  • License
    Other
  • Created over 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ninja-compatible build tool written in C

samurai

builds.sr.ht status GitHub build status

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

Status

samurai implements the ninja build language through version 1.9.0 except for MSVC dependency handling (deps = msvc). It uses the same format for .ninja_log and .ninja_deps as ninja, currently version 5 and 4 respectively.

It is feature-complete and supports most of the same options as ninja.

Requirements

samurai requires various POSIX.1-2008 interfaces.

Scheduling jobs based on load average requires the non-standard getloadavg function. This feature can be enabled by defining HAVE_GETLOADAVG in your CFLAGS, along with any other necessary definitions for your platform.

Differences from ninja

samurai tries to match ninja behavior as much as possible, but there are several cases where it is slightly different:

  • samurai uses the variable lookup order documented in the ninja manual, while ninja has a quirk (ninja-build/ninja#1516) that if the build edge has no variable bindings, the variable is looked up in file scope before the rule-level variables.
  • samurai schedules jobs using a stack, so the last scheduled job is the first to execute, while ninja schedules jobs based on the pointer value of the edge structure (they are stored in a std::set<Edge*>), so the first to execute depends on the address returned by malloc. This may result in build failures due to insufficiently specified dependencies in the project's build system.
  • samurai does not post-process the job output in any way, so if it includes escape sequences they will be preserved, while ninja strips escape sequences if standard output is not a terminal. Some build systems, like meson, force color output from gcc by default using -fdiagnostics-color=always, so if you plan to save the output to a log, you should pass -Db_colorout=auto to meson.
  • samurai follows the POSIX Utility Syntax Guidelines, in particular guideline 9, so it requires that any command-line options precede the operands. It does not do GNU-style argument permutation.

More Repositories

1

cproc

C11 compiler (mirror)
C
706
star
2

swc

a library for making a simple Wayland compositor
C
620
star
3

velox

velox window manager
C
490
star
4

wld

A primitive drawing library targeted at Wayland
C
81
star
5

sbase

Portable UNIX tools (personal repository)
C
56
star
6

st

C
49
star
7

libtls-bearssl

libtls implemented on top of BearSSL
C
37
star
8

qbe

Personal branch of git://c9x.me/qbe.git
C
36
star
9

dmenu

C
22
star
10

blake3-tiny

Tiny public-domain implementation of BLAKE3
C
20
star
11

oscmix

Mixer for RME Fireface UCX II
C
19
star
12

base64

public-domain base64 implementation
C
16
star
13

x509cert

Tool and library for generating X.509 certificates and certificate requests (mirror)
C
14
star
14

musl

C
12
star
15

ubase

personal branch of git://git.suckless.org/ubase
C
11
star
16

wl9

rio-wayland shim server
C
10
star
17

pax

pax archive utility
C
9
star
18

nine

wine for 9
C
9
star
19

upnp-av

UPnP AV server
C
7
star
20

libblit

C
6
star
21

dnssec-rr

Tools for working with DNSSEC (mirror)
C
6
star
22

inverse_kinematics

CS184 Final Project - Inverse Kinematics Solver
Haskell
5
star
23

tinyemu

C
5
star
24

sdhcp

C
5
star
25

coreboot

My fork of coreboot supporting Opus M4
C
5
star
26

tridactyla

tridactyla's exherbo repository, moved to git.exherbo.org
4
star
27

gefs

personal gefs branch
C
3
star
28

perp

persistent process supervision (http://b0llix.net/perp/)
C
3
star
29

resample

Public-domain audio resampler
Objective-C
3
star
30

trickle

Trickle is an extensible frontend to various BitTorrent clients. It runs on all platforms supported by KDE4, and can connect to any server running a supported BitTorrent backend, like rTorrent and XmlRpc, or uTorrent and WebUI.
C++
3
star
31

intpack

Integer encoding/decoding functions
C
3
star
32

tridactyla-personal

Tridactyla's exherbo repository for personal projects
2
star
33

opus_m4

Coreboot configuration and rom utilities for Opus M4
Shell
2
star
34

one_astronaut

C
2
star
35

smileys

smileys plugin for velox
C
2
star
36

playground

An area where I can play around with stuff
C++
2
star
37

fspec-extfs

WIP fspec extfs image builder
C
2
star
38

miniyacc

Personal branch of git://c9x.me/miniyacc.git
Yacc
1
star
39

libwl

Wayland client implementation in Myrddin
Python
1
star
40

surf

C
1
star
41

binutils-gdb

Personal binutils branch
C
1
star
42

fm

FM-Net implementation (https://docs.formality-lang.org/en/latest/theory/Formality-Net.html)
C
1
star
43

bearssl-util

1
star
44

arbor

arbor with musl support
1
star