{"id":45046904,"url":"https://github.com/cs01/chadscript","last_synced_at":"2026-04-01T16:49:14.909Z","repository":{"id":337764211,"uuid":"1093820046","full_name":"cs01/ChadScript","owner":"cs01","description":"Compile TypeScript to Native Binaries","archived":false,"fork":false,"pushed_at":"2026-03-10T06:28:32.000Z","size":7819,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-10T08:30:03.959Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://cs01.github.io/ChadScript/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cs01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-10T22:11:03.000Z","updated_at":"2026-03-10T06:22:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4d0feaf-7f37-4680-8b6b-d3592be84e45","html_url":"https://github.com/cs01/ChadScript","commit_stats":null,"previous_names":["cs01/chadscript"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cs01/ChadScript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs01%2FChadScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs01%2FChadScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs01%2FChadScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs01%2FChadScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cs01","download_url":"https://codeload.github.com/cs01/ChadScript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs01%2FChadScript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30413615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T00:40:14.898Z","status":"online","status_checked_at":"2026-03-12T02:00:07.260Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-19T08:11:51.269Z","updated_at":"2026-04-01T16:49:14.904Z","avatar_url":"https://github.com/cs01.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChadScript\n\nTypeScript, compiled to native code.\n\nChadScript compiles a statically analyzable subset of TypeScript to native machine code via LLVM — the same backend behind C, Rust, and Swift. No VM, no interpreter, no runtime. The output is a standalone binary: sub-millisecond startup, ~250KB, zero dependencies.\n\nThe compiler is self-hosting and the only dependency is itself. Install with curl, not npm.\n\n**Status: Beta** — self-hosting, 621+ tests, used in [production](https://chadsmith.dev/weather).\n\n**[Docs](https://cs01.github.io/ChadScript/getting-started/installation)** · **[Standard Library](https://cs01.github.io/ChadScript/stdlib/)** · **[Language Features](https://cs01.github.io/ChadScript/language/features)** · **[Benchmarks](https://cs01.github.io/ChadScript/benchmarks)**\n\n---\n\n## Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/cs01/ChadScript/main/install.sh | sh\n```\n\nNo dependencies — everything is bundled in the compiler.\n\n---\n\n## Example: API server\n\n```typescript\nimport { httpServe, Router, Context } from \"chadscript/http\";\n\nconst app: Router = new Router();\n\napp.get(\"/\", (c: Context) =\u003e {\n  return c.html(`\u003chtml\u003e\u003cbody style=\"font-family:system-ui;max-width:600px;margin:40px auto\"\u003e\n    \u003ch1\u003eChadScript API\u003c/h1\u003e\n    \u003cp\u003eA native binary serving this page. Try the endpoints:\u003c/p\u003e\n    \u003cul\u003e\n      \u003cli\u003e\u003ca href=\"/users/42\"\u003e/users/42\u003c/a\u003e — get user by ID\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"/users/alice/posts/7\"\u003e/users/alice/posts/7\u003c/a\u003e — nested params\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"/json\"\u003e/json\u003c/a\u003e — JSON response\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003cp\u003e\u003ccode\u003ecurl -X POST -d 'hello' localhost:3000/echo\u003c/code\u003e\u003c/p\u003e\n  \u003c/body\u003e\u003c/html\u003e`);\n});\n\napp.get(\"/json\", (c: Context) =\u003e {\n  return c.json({ name: \"ChadScript\", compiled: true });\n});\n\napp.get(\"/users/:id\", (c: Context) =\u003e {\n  return c.json({ id: c.req.param(\"id\") });\n});\n\napp.get(\"/users/:name/posts/:pid\", (c: Context) =\u003e {\n  return c.json({ user: c.req.param(\"name\"), post: c.req.param(\"pid\") });\n});\n\napp.post(\"/echo\", (c: Context) =\u003e {\n  return c.text(c.req.body);\n});\n\nhttpServe(3000, (req: HttpRequest) =\u003e app.handle(req));\n```\n\n```bash\nchad build app.ts \u0026\u0026 ./app   # compiles in ~0.3s, starts in \u003c2ms\n```\n\nHono-style API, C-level performance. One binary, no node_modules. See [`examples/`](examples/) for more: [weather app](examples/apps/weather/) (in production at [chadsmith.dev/weather](https://chadsmith.dev/weather)), [Hacker News clone](examples/apps/hackernews/), [WebSocket chat](examples/apps/websocket/), SQLite, and more.\n\n---\n\n## Benchmarks\n\nChadScript compiles through LLVM, the same backend behind C and Rust — so it gets the same optimization passes. Compared against C, Go, Node.js, and Bun on Ubuntu (CI):\n\n| Benchmark      | ChadScript | Node.js | vs Node  | C      |\n| -------------- | ---------- | ------- | -------- | ------ |\n| Cold Start     | **0.6ms**  | 21.8ms  | **36x**  | 0.6ms  |\n| Monte Carlo Pi | **0.398s** | 1.474s  | **3.7x** | 0.400s |\n| File I/O       | **0.089s** | 0.315s  | **3.5x** | 0.088s |\n| JSON Parse     | **0.005s** | 0.015s  | **3.0x** | 0.004s |\n| Fibonacci      | **1.424s** | 2.842s  | **2.0x** | 0.725s |\n| Sieve          | **0.038s** | 0.054s  | **1.4x** | 0.027s |\n| N-Body Sim     | **1.852s** | 2.296s  | **1.2x** | 1.453s |\n| Quicksort      | **0.202s** | 0.249s  | **1.2x** | 0.170s |\n| SQLite         | **0.374s** | 0.437s  | **1.2x** | 0.314s |\n\n[Full benchmarks with Go and Bun](https://cs01.github.io/ChadScript/benchmarks) (updated on every PR)\n\n---\n\n## It's Fast\n\nYour code goes through the same LLVM optimization passes as C and Rust — not a JIT, not an interpreter. 0.8ms cold start, native execution speed.\n\n## It's Familiar\n\nClasses, interfaces, generics, async/await, closures, destructuring, template literals, JSX, `for...of`, `Map`, `Set`, `Promise.all` — it's the TypeScript you already write. No new syntax, no new mental model.\n\n## It's Friendly\n\nNo `npm install`. Everything ships with the compiler: HTTP server, SQLite, fetch, crypto, WebSocket, JSON, filesystem, regex, child processes, argument parsing. Write your code, compile it, ship a single binary.\n\n---\n\n## Examples\n\n```bash\ngit clone https://github.com/cs01/ChadScript \u0026\u0026 cd ChadScript\n\nchad run examples/snippets/hello.ts\nchad run examples/snippets/parallel.ts          # async/await + Promise.all\nchad run examples/snippets/sqlite-demo.ts       # SQLite\nchad run examples/apps/http-server/app.ts       # http://localhost:3000\nchad run examples/apps/weather/app.ts           # weather app — live at https://chadsmith.dev/weather\nchad run examples/apps/hackernews/app.ts        # Hacker News clone\n```\n\nSee [`examples/cli-tools/`](examples/cli-tools/) for a suite of Unix tool replacements: `cgrep`, `cwc`, `ccat`, `ctree`, `chex`, `cjq`, `cql`, `chttp`, and `cserve`.\n\n---\n\n## Docs\n\n- [Installation](https://cs01.github.io/ChadScript/getting-started/installation)\n- [Quickstart](https://cs01.github.io/ChadScript/getting-started/quickstart)\n- [Supported Features](https://cs01.github.io/ChadScript/language/features)\n- [Standard Library](https://cs01.github.io/ChadScript/stdlib/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcs01%2Fchadscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcs01%2Fchadscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcs01%2Fchadscript/lists"}