pkg/wuffs: build without libc

This modifies our wuffs dependency so that it no longer requires libc.

This unblocks using wuffs from libghostty-vt on freestanding targets,
which we'll eventually want for some Kitty graphics stuff.
This commit is contained in:
Mitchell Hashimoto
2026-08-20 21:17:25 -07:00
parent 08450e21e5
commit 619555d1cc
5 changed files with 79 additions and 8 deletions

View File

@@ -0,0 +1,13 @@
// Minimal stdlib.h so that wuffs can be translated and compiled without
// requiring libc headers. See string.h in this directory for details.
#ifndef GHOSTTY_WUFFS_STDLIB_H
#define GHOSTTY_WUFFS_STDLIB_H
#include <stddef.h>
void *malloc(size_t size);
void *calloc(size_t count, size_t size);
void *realloc(void *ptr, size_t size);
void free(void *ptr);
#endif