GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tsoding/nob.h: Header only library for writing build recipes in C.

BranchesTags
Open more actions menu

Latest commit

 

History

252 Commits
252 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
how_to
how_to
 
 
tasks/20260317-165339
tasks/20260317-165339
 
 
tests
tests
 
 
tools/parallel-benchmark
tools/parallel-benchmark
 
 
.gitignore
.gitignore
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
nob.c
nob.c
 
 
nob.h
nob.h
 
 
shared.h
shared.h
 
 

Repository files navigation

nob.h - Next generation of the NoBuild

This library is the next generation of the NoBuild idea. "nob" stands for "nobuild", but it's shorter and more suitable as a prefix for a library.

For my previous iteration on this idea see https://github.com/tsoding/nobuild, but I do not recommend to use it.

NoBuild 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.

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 nob in a variety of my C projects at https://github.com/tsoding/. 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. (But in that case I personally think you have much bigger problem than a build system). NoBuild is more like writing 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

The only file you need from here is nob.h. Just copy-paste it to your project and start using it. See how_to/ folder for examples.

NoBuild in Other Languages

This is obviously applicable not only to C. You can implement the same kind of approach for other languages (apart from the languages that support this natively, of course). Here is few examples in the wild:

  • C++ - https://github.com/zhiayang/nabs
  • Java
    • https://gitlab.com/NikaDev/arris
    • https://codeberg.org/ptrace/job
  • Fortran - https://codeberg.org/shascilowicz/fob.f90
  • ...

Feel free to contribute more

About

Header only library for writing build recipes in C.

Resources

Readme
License

Contributing

Contributing
Activity
Custom properties

Stars

3.4k stars

Watchers

29 watching

Forks

218 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.