summaryrefslogtreecommitdiff
path: root/src/web/libc
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 11:40:11 -0300
committerGabriel Schneider <[email protected]>2026-11-05 12:41:36 -0300
commit3f1533813b6692a736251e4d467a7f108229ddee (patch)
tree37a32c5ebbf9d3af08923856fd6fa516f3b33a39 /src/web/libc
parentcfd2b993feda1b3f7474225bb32db8cac8edc5ae (diff)
downloadpardes-3f1533813b6692a736251e4d467a7f108229ddee.tar.gz
pardes-3f1533813b6692a736251e4d467a7f108229ddee.zip
targets: the DOM web shell goes (src/web.zig and src/web/, its harnesses web_harness, web_snapshot, web_driver_test and web-snapshots/, tools/web_fixture.py, -Dplatform=web, -Ddump, and the web, web-harness, web-snap, web-e2e and web-driver-test steps), and with it what only a freestanding build needed: `hosted` and every guard on it (every build has a host now), memory's stack-fallback arenas and reduced_target sizes, the emscripten main, the tree-sitter libc shim and the stb stub, lsp's has_client, the web arms of the platform switches (-Dplatform is tui, gui or macos); the macOS files pass zig ast-check; docs/web.md is a paragraph on what it was
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/web/libc')
-rw-r--r--src/web/libc/include/assert.h14
-rw-r--r--src/web/libc/include/ctype.h7
-rw-r--r--src/web/libc/include/endian.h21
-rw-r--r--src/web/libc/include/inttypes.h8
-rw-r--r--src/web/libc/include/limits.h9
-rw-r--r--src/web/libc/include/stdio.h19
-rw-r--r--src/web/libc/include/stdlib.h16
-rw-r--r--src/web/libc/include/string.h17
-rw-r--r--src/web/libc/include/wchar.h9
-rw-r--r--src/web/libc/include/wctype.h18
10 files changed, 0 insertions, 138 deletions
diff --git a/src/web/libc/include/assert.h b/src/web/libc/include/assert.h
deleted file mode 100644
index fd018947..00000000
--- a/src/web/libc/include/assert.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef PARDES_WEB_ASSERT_H
-#define PARDES_WEB_ASSERT_H
-
-#ifndef static_assert
-#define static_assert _Static_assert
-#endif
-
-#ifdef NDEBUG
-#define assert(expression) ((void)0)
-#else
-#define assert(expression) ((expression) ? (void)0 : __builtin_trap())
-#endif
-
-#endif
diff --git a/src/web/libc/include/ctype.h b/src/web/libc/include/ctype.h
deleted file mode 100644
index 985c8759..00000000
--- a/src/web/libc/include/ctype.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef PARDES_WEB_CTYPE_H
-#define PARDES_WEB_CTYPE_H
-
-int isprint(int character);
-int isdigit(int character);
-
-#endif
diff --git a/src/web/libc/include/endian.h b/src/web/libc/include/endian.h
deleted file mode 100644
index a047c88f..00000000
--- a/src/web/libc/include/endian.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef PARDES_WEB_ENDIAN_H
-#define PARDES_WEB_ENDIAN_H
-
-#define __LITTLE_ENDIAN 1234
-#define __BIG_ENDIAN 4321
-#define __BYTE_ORDER __LITTLE_ENDIAN
-
-#define htole16(value) (value)
-#define le16toh(value) (value)
-#define htole32(value) (value)
-#define le32toh(value) (value)
-#define htole64(value) (value)
-#define le64toh(value) (value)
-#define htobe16(value) __builtin_bswap16(value)
-#define be16toh(value) __builtin_bswap16(value)
-#define htobe32(value) __builtin_bswap32(value)
-#define be32toh(value) __builtin_bswap32(value)
-#define htobe64(value) __builtin_bswap64(value)
-#define be64toh(value) __builtin_bswap64(value)
-
-#endif
diff --git a/src/web/libc/include/inttypes.h b/src/web/libc/include/inttypes.h
deleted file mode 100644
index 7e795746..00000000
--- a/src/web/libc/include/inttypes.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef PARDES_WEB_INTTYPES_H
-#define PARDES_WEB_INTTYPES_H
-
-#include <stdint.h>
-
-#define PRId32 "d"
-
-#endif
diff --git a/src/web/libc/include/limits.h b/src/web/libc/include/limits.h
deleted file mode 100644
index 6ba31375..00000000
--- a/src/web/libc/include/limits.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef PARDES_WEB_LIMITS_H
-#define PARDES_WEB_LIMITS_H
-
-#define CHAR_BIT __CHAR_BIT__
-#define INT_MAX __INT_MAX__
-#define UINT_MAX (__INT_MAX__ * 2U + 1U)
-#define USHRT_MAX (__SHRT_MAX__ * 2U + 1U)
-
-#endif
diff --git a/src/web/libc/include/stdio.h b/src/web/libc/include/stdio.h
deleted file mode 100644
index 92895054..00000000
--- a/src/web/libc/include/stdio.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef PARDES_WEB_STDIO_H
-#define PARDES_WEB_STDIO_H
-
-#include <stdarg.h>
-#include <stddef.h>
-
-typedef struct PardesWebFile FILE;
-
-#define stderr ((FILE *)0)
-
-int fprintf(FILE *stream, const char *format, ...);
-int fclose(FILE *stream);
-FILE *fdopen(int descriptor, const char *mode);
-int fputc(int character, FILE *stream);
-int fputs(const char *string, FILE *stream);
-int snprintf(char *restrict buffer, size_t size, const char *restrict format, ...);
-int vsnprintf(char *restrict buffer, size_t size, const char *restrict format, va_list args);
-
-#endif
diff --git a/src/web/libc/include/stdlib.h b/src/web/libc/include/stdlib.h
deleted file mode 100644
index cb280904..00000000
--- a/src/web/libc/include/stdlib.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef PARDES_WEB_STDLIB_H
-#define PARDES_WEB_STDLIB_H
-
-#include <stddef.h>
-
-#ifndef NULL
-#define NULL ((void *)0)
-#endif
-
-void *malloc(size_t size);
-void *calloc(size_t count, size_t size);
-void *realloc(void *ptr, size_t size);
-void free(void *ptr);
-_Noreturn void abort(void);
-
-#endif
diff --git a/src/web/libc/include/string.h b/src/web/libc/include/string.h
deleted file mode 100644
index 7e5b8783..00000000
--- a/src/web/libc/include/string.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef PARDES_WEB_STRING_H
-#define PARDES_WEB_STRING_H
-
-#include <stddef.h>
-
-void *memchr(const void *ptr, int value, size_t count);
-int memcmp(const void *lhs, const void *rhs, size_t count);
-void *memcpy(void *restrict dest, const void *restrict src, size_t count);
-void *memmove(void *dest, const void *src, size_t count);
-void *memset(void *dest, int value, size_t count);
-size_t strlen(const char *str);
-char *strchr(const char *str, int character);
-int strcmp(const char *lhs, const char *rhs);
-int strncmp(const char *lhs, const char *rhs, size_t count);
-char *strncpy(char *restrict dest, const char *restrict src, size_t count);
-
-#endif
diff --git a/src/web/libc/include/wchar.h b/src/web/libc/include/wchar.h
deleted file mode 100644
index 4888631e..00000000
--- a/src/web/libc/include/wchar.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef PARDES_WEB_WCHAR_H
-#define PARDES_WEB_WCHAR_H
-
-#include <stddef.h>
-#include <wctype.h>
-
-typedef __WCHAR_TYPE__ wchar_t;
-
-#endif
diff --git a/src/web/libc/include/wctype.h b/src/web/libc/include/wctype.h
deleted file mode 100644
index 77bbabe9..00000000
--- a/src/web/libc/include/wctype.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef PARDES_WEB_WCTYPE_H
-#define PARDES_WEB_WCTYPE_H
-
-#include <stddef.h>
-
-typedef unsigned int wint_t;
-
-int iswalnum(wint_t character);
-int iswalpha(wint_t character);
-int iswblank(wint_t character);
-int iswdigit(wint_t character);
-int iswlower(wint_t character);
-int iswspace(wint_t character);
-int iswupper(wint_t character);
-int iswxdigit(wint_t character);
-wint_t towupper(wint_t character);
-
-#endif