Pure C11 with libc only. No package manager, no git submodules, no runtime shared libraries. One static binary, everything compiled from source.
Zero external dependencies — pure C with libc only. All functionality is either hand-written C11 or vendored single-file libraries compiled from source. The only runtime linkage on native Linux is libcurl (statically linked from /opt/curl-static). No package manager, no git submodules, no dynamic library downloads.
Instead of pulling in external C libraries, scorpiox code reimplements core functionality in hand-written C11. Each component below replaces one or more commonly-used open-source libraries.
| Component | Replaces | Lines | Notes |
|---|---|---|---|
| JSON streaming parser | cJSON, jansson |
65 | Hand-written SSE streaming JSON parser for partial buffers; full JSON handled by vendored yyjson |
| JSON wrapper helpers (yyjson-based) | cJSON, jansson (high-level API) |
445 | Thin convenience layer over vendored yyjson for project-specific patterns |
| Terminal UI (no ncurses) | ncurses, termbox, notcurses |
5,672 | Pure ANSI escape sequence terminal UI — raw termios, no curses dependency |
| HTML stripper | libxml2, gumbo-parser |
627 | Lightweight HTML-to-text converter with entity decoding |
| KQL-to-SQL translator | external query translators |
1,371 | Hand-written Kusto Query Language parser and T-SQL code generator |
| TCP raw-socket HTTP client | libcurl (for simple fetches) |
358 | Direct socket-level HTTP for fetchtoken servers; full HTTP uses statically-linked curl |
| PTY-based process executor | libutil, expect |
731 | Raw forkpty/openpty terminal multiplexing with non-blocking output buffering |
| Configuration system | libconfig, inih, toml-c |
1,083 | Custom hierarchical config with environment variable overlay |
| Argument parsing / slash command parser | getopt_long, argp, docopt |
112 | Custom slash-command parser for TUI; getopt.h used only in bridge/ws2tcp.c |
| Thunderbolt 4 transport | libtbolt, thunderbolt-tools |
1,043 | Raw Thunderbolt 4 device transport layer |
| Total | 11,507 |
Three vendored libraries are compiled from source into the static binary. No download at build time — the source lives in-tree.
| Library | Provides | Lines | Source |
|---|---|---|---|
| yyjson vendored single-file |
Fast JSON read/write (RFC 8259 compliant) | 19,556 | scorpiox/vendor/yyjson/Pure C99, zero deps, compiled from source into static lib |
| mbedtls vendored |
TLS/SSL, X.509 certificates, cryptographic primitives | 208,584 | scorpiox/vendor/mbedtls/Pure C, compiled from source into static libs (libmbedtls, libmbedx509, libmbedcrypto) |
| stb_image v2.30 |
Image loading (PNG, JPG, BMP, GIF) | 7,988 | scorpiox/libsxui/stb_image.hSingle-header public domain library, no external deps |
| Total vendored | 236,128 |
Five internal static libraries organize the codebase. All are pure C11 hand-written code compiled and linked statically.
| Library | Provides | Lines | Source |
|---|---|---|---|
| libsxutil | Core utilities: config, logging, session, conversation, exec, PTY, background tasks, platform abstraction, HTML strip, KQL, rewind, slash commands, system prompts, time, tools | 23,736 | scorpiox/libsxutil/ |
| libsxnet | HTTP client abstraction, LLM provider layer (Anthropic, OpenAI, Gemini, Claude Code, Codex, ScorpioX router), JSON helpers, agent loop, MCP, state management | 22,785 | scorpiox/libsxnet/ |
| libsxui | Terminal UI: display, input, bash terminal, file explorer, info box, resume, state, callbacks (pure ANSI escapes, no ncurses) | 3,378 | scorpiox/libsxui/ · Excludes vendored stb_image.h (7988 lines) |
| libsxbridge | WebSocket-to-native bridge for WASM builds | 625 | scorpiox/libsxbridge/ |
| libtb4 | Thunderbolt 4 device transport | 1,043 | scorpiox/libtb4/ |
| Total internal | 51,567 |
157 standard C library functions across 13 categories. These are the only external functions the binary calls — all from POSIX libc.
strcmp, strlen, strdup, strndup, strncmp, strcpy, strncpy, strcat, strncat, strstr, strchr, strrchr, strtok, strtol, strtoul, strtod, strtoll, strtoull, strerror, strftimemalloc, calloc, realloc, free, mmap, munmap, memcpy, memset, memmove, memcmpfopen, fclose, fread, fwrite, fgets, fputs, fseek, ftell, fflush, feof, ferror, fileno, fdopenread, write, open, close, lseek, dup, dup2, pipe, fcntl, ioctl, isatty, ftruncate, fsyncprintf, fprintf, snprintf, sprintf, vsnprintf, vfprintf, perrorstat, fstat, lstat, access, unlink, rename, mkdir, rmdir, opendir, readdir, closedir, realpath, symlink, readlink, chmod, chown, umask, mkstemp, mkdtempsocket, connect, bind, listen, accept, send, recv, sendto, recvfrom, setsockopt, getsockopt, getaddrinfo, freeaddrinfo, getsockname, getpeername, shutdown, inet_pton, inet_ntop, htons, ntohs, htonl, ntohl, gethostname, select, poll, epoll_ctl, epoll_waitfork, execvp, execv, execve, waitpid, kill, signal, sigaction, getpid, getppid, getuid, getgid, setuid, system, popen, pclose, _exit, exit, abort, atexitpthread_create, pthread_join, pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock, pthread_mutex_destroy, pthread_cond_init, pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast, pthread_cond_destroy, pthread_rwlock_inittime, localtime, gmtime, strftime, mktime, clock_gettime, sleep, usleep, nanosleeptcgetattr, tcsetattrgetenv, setenv, putenv, getcwd, chdir, gethostnameatoi, atof, atol, abs, rand, srand, qsort, bsearch, getoptThe default build uses SX_STATIC_LINK=ON to produce a fully static binary. libcurl and all its transitive dependencies are statically linked.
-fstack-protector-strong-D_FORTIFY_SOURCE=2-Wl,-z,noexecstack-Wl,-z,relro,-z,now-fcf-protection (GCC only)find_package() — ✅C11 (CMAKE_C_STANDARD 11)find_package(Python3) — build-time only, code generationfind_package(CURL) — statically linked, falls back to /opt/curl-staticfind_package(Threads) — pthreads (part of libc/system)find_package(X11) — optional, Linux GUI screenshot onlyStandard POSIX/C headers used (no external library headers):
The scorpiox/clang codebase compiles to a fully static binary on Linux. All code is either hand-written C11 or vendored single-file/source libraries (yyjson, mbedtls, stb_image) compiled directly into the binary. libcurl is the only system library used beyond libc/POSIX, and it is statically linked with all its transitive dependencies bundled. No external package manager, no git submodules, no dlopen() of shared libraries at runtime. The resulting binary is a single self-contained executable.