Skip to content

Add file embedding and multi-column SQLite support#8

Merged
cs01 merged 11 commits intomainfrom
demo-server
Feb 19, 2026
Merged

Add file embedding and multi-column SQLite support#8
cs01 merged 11 commits intomainfrom
demo-server

Conversation

@cs01
Copy link
Owner

@cs01 cs01 commented Feb 19, 2026

Summary

Language & API improvements

  • SQLite: sqlite.get() and sqlite.all() now return all columns pipe-separated (e.g., "1|Alice") with a new __sqlite_row_to_string helper
  • fs.statSync(): isFile and isDirectory are now methods (.isFile()) for Node.js compatibility; fixed path.join() behavior
  • Compile-time file embedding: New ChadScript.embedFile(), embedDir(), and getEmbeddedFile() for bundling static assets into binaries
  • fix path.resolve to join all arguments before calling realpath

Build & tooling

  • Cross-compilation support for different target architectures
  • argparse subcommands: Added subcommand support; migrated chad-native.ts to use it
  • HTTP server: Content-type detection from file extensions (.css, .js, .json, .html, .svg, .png, .jpg, .woff2, .wasm)
  • CI improvements: Added --target-cpu flag; default to x86-64 in CI to fix SIGILL on runners

Examples & other

  • New Hacker News example app demonstrating embedded files and HTTP routing
  • Added query and parallel example programs
  • Installer updates (color escapes, linker flags for macOS SDK)

All tests pass; self-hosting verified.

@cs01 cs01 force-pushed the demo-server branch 2 times, most recently from 48a4ee8 to 155319f Compare February 19, 2026 06:22
@cs01 cs01 merged commit a7392b3 into main Feb 19, 2026
11 checks passed
@cs01 cs01 deleted the demo-server branch February 19, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments