• Stars
    star
    305
  • Rank 131,729 (Top 3 %)
  • Language
    C
  • License
    MIT License
  • Created over 3 years ago
  • Updated 8 months ago

Reviews

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

Repository Details

Header only library for writing build recipes in C.

nobuild

Header only library for writing build recipes in C.

Main idea

The idea is that you should not need anything but a C compiler to build a C project. No make, no cmake, no shell, no cmd, no PowerShell etc. Only C compiler. So with the C compiler you bootstrap your build system and then you use the build system to build everything else.

Try it out right here:

$ cc ./nobuild.c -o nobuild
$ ./nobuild

Explore nobuild.c file and the examples folder to learn more.

This is an Experimental Project

I'm not sure if this is even a good idea myself. This is why I'm implementing it. This is a research project. I'm not making any claims about suitability of this approach to any project.

Right now I'm actively using nobuild only in bm. It works quite well for me there.

It's likely Not Suitable for Your Project

If you are using cmake with tons of modules to manage and find tons of dependencies you probably don't want to use this tool. nobuild is more like writting shell scripts but in C.

Advantages of nobuild

  • Extremely portable builds across variety of systems including (but not limited to) Linux, MacOS, Windows, FreeBSD, etc. This is achieved by reducing the amount of dependencies to just a C compiler, which exists pretty much for any platform these days.
  • You end up using the same language for developing and building your project. Which may enable some interesting code reusage strategies. The build system can use the code of the project itself directly and the project can use the code of the build system also directly.
  • You get to use C more.
  • ...

Disadvantages of nobuild

  • You need to be comfortable with C and implementing things yourself. As mentioned above this is like writing shell scripts but in C.
  • It probably does not make any sense outside of C/C++ projects.
  • You get to use C more.
  • ...

Why is it called "nobuild" when it's clearly a build tool?

You know all these BS movements that supposedly remove the root cause of your problems? Things like NoSQL, No-code, Serverless, etc. This is the same logic. I had too many problems with the process of building C projects. So there is nobuild anymore.

How to use the library in your own project

Keep in mind that nobuild.h is an stb-style header-only library. That means that just including it does not include the implementations of the functions. You have to #define NOBUILD_IMPLEMENTATION before the include. See our nobuild.c for an example.

  1. Copy nobuild.h to your project
  2. Create nobuild.c in your project with the build recipe. See our nobuild.c for an example.
  3. Bootstrap the nobuild executable:
    • $ cc nobuild.c -o nobuild on POSIX systems
    • $ cl.exe nobuild.c on Windows with MSVC
  4. Run the build: $ ./nobuild

If you enable the Go Rebuild Urself™ Technology the nobuild executable will try to rebootstrap itself every time you modify its source code.

More Repositories

1

olive.c

Simple 2D Graphics Library for C
C
1,702
star
2

porth

It's like Forth but in Python
620
star
3

musializer

Music Visualizer
C
575
star
4

pinpog

Ping-Pong-like game in Assembly that works without OS
Assembly
517
star
5

ded

Dramatic EDitor
C
452
star
6

snitch

Language agnostic tool that collects TODOs in the source code and reports them as Issues
Go
416
star
7

todo.asm

Todo Web Application in flat assembler
Assembly
397
star
8

boomer

Zoomer application for Linux
Nim
370
star
9

nn.h

Simple stb-style header-only library for Neural Networks
C
299
star
10

c.php

C to Python compiler in PHP
PHP
286
star
11

nothing

A simple platformer about nothing
C
273
star
12

Noq

Simple expression transformer that is not Coq.
Rust
249
star
13

seroost

Local Search Engine
Rust
207
star
14

4at

Simple Multi-User Chat
Rust
153
star
15

JelloVM

JVM in Python that can only run "Hello, World"
Python
141
star
16

haskell-json

Source Code for JSON Parser Video
Haskell
136
star
17

emoteJAM

Simple website that generates animated BTTV emotes from static images.
TypeScript
130
star
18

haskell-music

Source Code from "Making Music with Haskell" video
Haskell
130
star
19

bm

Simple compiler ecosystem
C
126
star
20

wassm

Web framework for x86_64 nasm
Assembly
126
star
21

HyperNerd

Total Surveillance Automatic Ban Machine for Twitch and Discord
Haskell
124
star
22

sowon

Starting Soon Timer for Tsoding Streams
C
123
star
23

bfjit

JIT Compiler for Brainfuck
C
114
star
24

arena

Arena Allocator implementation in pure C as an stb-style single-file library.
C
110
star
25

zozlib.js

Unofficial Implementation of Subset of Raylib API in JavaScript
C
110
star
26

memalloc

Artifacts of that Memory Management Tsoding Session
C
107
star
27

aoc-2020

Advent of Code 2020 in 25 Different Languages
Julia
104
star
28

todo-rs

Simple Interactive Terminal Todo App in Rust
Rust
90
star
29

la

Linear Algebra in C
C
88
star
30

grecha.js

Simple Front-End JavaScript Framework
JavaScript
87
star
31

cm

Emacs' compilation-mode-like TUI application
Rust
86
star
32

fasm-raylib-simd

A simple demo of using SIMD instructions and Raylib in fasm
C
83
star
33

HTMLang

HTML as a Programming Language. Finally all of your dreams came true.
JavaScript
82
star
34

dimooper

Digital Music Looper
Rust
82
star
35

jaibreak

JavaScript
82
star
36

ml-notes

Notes from Machine Learning in C session
C
80
star
37

sv

Simple String_View implementation for C programming language.
C
79
star
38

img2term

Print an image in the terminal using the term 256 colors
C
79
star
39

profun

Procedural vs Functional
C
79
star
40

snake-c-wasm

Snake written in Pure C and compilable to WebAssembly
C
78
star
41

perceptron

Simple Perceptron Implementation inspired by Veritasium Video
C
75
star
42

opengl-template

Just a simple OpenGL template that I use on my streams.
C
74
star
43

SmoothLife

SmoothLife Implementation in C
C
67
star
44

noed

Not ed(1) text editor
C
66
star
45

faq

FAQ
66
star
46

kdtree-in-python

Source Code for K-d tree in Python series
Python
66
star
47

bada

Simple Programming Language that compiles to BEAM bytecode
Rust
66
star
48

binviz

Binary Visualization based on Christopher Domas talk: https://www.youtube.com/watch?v=4bM3Gut1hIk
C
65
star
49

jai-wasm

Jai WebAssembly Proof-of-Concept
JavaScript
63
star
50

tic-tac-toe-fortran-raylib

Tic-Tac-Toe in Fortran with Raylib
Fortran
57
star
51

rendering-video-in-c-with-ffmpeg

Rendering Video in C with FFMpeg
C
55
star
52

piff

Simple File Diff Tool in Python
Python
50
star
53

ebisp

Embedded Lisp
C
49
star
54

zigout

An attempt to implement breakout in Zig
Zig
49
star
55

flag.h

Command-line flag parsing in C
C
49
star
56

mine

Minesweeper in Terminal
Pascal
47
star
57

glob.h

Simple Header-Only Implementation of Glob Matching
C
46
star
58

autocell

Cellular Automata Experiment
TypeScript
45
star
59

something

Finally something
C
44
star
60

something-rewrite

Rewrite of Something from scratch
C
42
star
61

minicel

Simple Excel engine without any UI
C
41
star
62

vodus

Twitch VOD chat renderer
C
41
star
63

jim

Immediate Mode JSON Serialization Library in C
C
40
star
64

elf.js

An on going project to learn ELF format.
TypeScript
39
star
65

imhui

Immediate Human User Interface
C
38
star
66

wang-tiles

Wang Tiles Grid generator
C
37
star
67

stb_image_js

stb_image.h wrapper for a Web Browser
C
36
star
68

rcui

Simple TUI framework in Rust
Rust
35
star
69

simple-ocaml-raylib-template

Intentionally Simple Raylib OCaml Template
OCaml
33
star
70

markut

Autocut the Twitch VODs based on a Marker file
Go
32
star
71

voronoi-opengl

Voronoi with OpenGL using Depth Buffer
C
31
star
72

rust-browser-game

Bloat-Free Browser Game in Rust (rustc-only challenge)
Rust
30
star
73

wacket

Racket to WebAssembly "compiler".
Racket
30
star
74

parcoom

Parser Combinators of Monad
OCaml
30
star
75

data-mining-in-c

Notes and Source Code from the Data Mining in C series.
C
29
star
76

schedule

Schedule for Tsoding Streams
TypeScript
28
star
77

command-pattern

Command Pattern (an Imperative one)
Rust
28
star
78

voidf

V̳͙̥̹̟͗̀̎̓͌͐́O̘̞͇̞̣͇͕͂͠I͙̋͐̍͂̀D̶͕̩̦̲͙F̟̖̮ͩ̏ͥ̂ͨ͠ ͍̰̫̯͙̯ͨ̉ͤ̈̿ͭI̤͍̲̯ͤ̎̀͝S̴̻͇̳̗̩ͧ̆ ̭̘̦ͭ͒Ĉ̸̰̼̤̖̲O̹̭̞̺̻͚̣̒M̪͓̗̤͋͢Ĩ͔̗̣̻̄̏̏̏̚N̳̦̂ͯ̅͂̓̈́G͈̣
C
27
star
79

deque.py

Deque-based Programming Language
Python
27
star
80

wisp

Wisp is a set of simple scripts for setting up small QEMU-based Virtual Machines
Shell
27
star
81

skedudle

Simple Event Schedule Web Application in C
C
26
star
82

dedup

Duplicate Files Searcher
C++
26
star
83

turj

Turing Machine in Jai
C
26
star
84

turd

Turing Machine in D
D
26
star
85

zzzwe

zzzwe
JavaScript
25
star
86

rope-jai

Rope simulation in Jai
24
star
87

ditch

Simple Twitch Client
23
star
88

ht

This is the notes from a Hash Table in C stream.
C
23
star
89

rust-pdf-hacking

Just some experiments with parsing PDF using Rust with minimal dependencies
Rust
23
star
90

tetris-jai

Simple Implement of Tetris Game in Jai
22
star
91

tic-tac-toe-auto-deref

A simple experiment that adds Auto Dereferencing of the Structures to C Programming Languages.
C
21
star
92

x11-double-buffering

Trying different approaches to Double Buffering in Pure X11 applications on Linux
C
21
star
93

atomato

A collection of different Cellular Automata implementations for recreational purposes
C
21
star
94

Gatekeeper

The chat bot Zozin does not want you to know about.
Go
20
star
95

dumb-sqrt

Dumb Sqrt Algorithm Visualization
TypeScript
20
star
96

bezier

Just a fun little project to learn how to render Bézier Curves.
C
20
star
97

metaballs

Metaballs
C
19
star
98

2mpeg4yuv

It's 2mpeg4yuv
Rust
19
star
99

cws

Custom WebSocket implementation in C for educational and recreational purposes.
C
19
star
100

vulkano-rainbow-triangle

Classical Rainbow Triangle using Rust and Vulkan via vulkano bindings
Rust
18
star