replace nob with new custom noblike

This commit is contained in:
2026-03-12 15:26:22 -04:00
parent c7bb89fd6d
commit 06e1212483
6 changed files with 1335 additions and 3945 deletions

View File

@@ -11,7 +11,7 @@ Requires MSVC (Visual Studio 2019 Build Tools or later) with the Windows SDK and
Open a Developer Command Prompt, then:
```
cl /nologo build.c
cl /nologo build.cpp
build.exe debug
build_debug\autosample.exe
```
@@ -21,12 +21,12 @@ build_debug\autosample.exe
Requires Xcode Command Line Tools (`xcode-select --install`).
```
cc build.c -o build
c++ build.cpp -o build
./build debug
open build_debug/autosample.app
```
The first command is a one-time bootstrap. After that, `./build` detects changes to `build.c` and rebuilds itself automatically. Pass `debug` for a debug build (output in `build_debug/`) or omit for release (`build_release/`). Pass `clean` to wipe both build directories, vendor libraries, and generated sources. Invalid arguments produce an error with usage info.
The first command is a one-time bootstrap. After that, `./build` detects changes to `build.cpp` and rebuilds itself automatically. Pass `debug` for a debug build (output in `build_debug/`) or omit for release (`build_release/`). Pass `clean` to wipe both build directories, vendor libraries, and generated sources. Invalid arguments produce an error with usage info.
## Architecture
@@ -96,14 +96,13 @@ MIDI device enumeration with real-time input monitoring.
## Project structure
```
build.c Build script (cc build.c -o build)
build.h Build system library (stb-style single header)
build.cpp Build script (c++ build.cpp -o build)
assets/
fonts/
Inter-Regular.ttf Inter typeface (SIL Open Font License)
OFL.txt Font license
vendor/
nob/
nob.h nob build system (vendored, single-header)
clay/
clay.h Clay v0.14 (modified for MSVC C++ compatibility)
freetype/
@@ -167,7 +166,6 @@ Memory should be managed with arena allocators where possible rather than indivi
All dependencies are vendored as source. On Windows, nothing to install beyond the Windows SDK. On macOS, only Xcode Command Line Tools are needed — all frameworks (Metal, Cocoa, CoreAudio, CoreMIDI, etc.) ship with the OS.
- [nob.h](https://github.com/tsoding/nob.h) — build system
- [Clay](https://github.com/nicbarker/clay) — single-header C layout library (v0.14, with MSVC C++ patches)
- [FreeType](https://freetype.org/) — font rasterizer (v2.13.3, FreeType License). Compiled as a static library with a minimal module set (truetype, sfnt, smooth, autofit, psnames, pshinter, gzip). Replaces platform-specific font backends (GDI on Windows, Core Text on macOS) for consistent cross-platform text rendering. Static libraries are built into their vendor directories (`vendor/freetype/freetype.lib` on Windows, `vendor/freetype/libfreetype.a` on macOS); debug builds on Windows use a `_d` suffix to avoid CRT mismatch.
- [Inter](https://rsms.me/inter/) — typeface (v4.1, SIL Open Font License). Embedded at build time as a C byte array header so there are no runtime font file dependencies.