{"id":46371582,"url":"https://github.com/humancto/forge-lang","last_synced_at":"2026-04-12T07:03:02.946Z","repository":{"id":341243555,"uuid":"1169418015","full_name":"humancto/forge-lang","owner":"humancto","description":"Forge — an internet-native programming language with built-in HTTP, database, crypto, AI, JIT compiler, and 14 interactive tutorials. Write less. Build more.","archived":false,"fork":false,"pushed_at":"2026-03-05T19:34:59.000Z","size":12872,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-06T07:42:34.946Z","etag":null,"topics":["bytecode-vm","developer-tools","http","internet-native","jit-compiler","language","natural-language-syntax","programming-language","rust","scripting-language"],"latest_commit_sha":null,"homepage":"https://humancto.github.io/forge-lang/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humancto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-28T16:55:53.000Z","updated_at":"2026-03-05T19:35:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b0ef71e-0a66-4278-b2e8-ea7c2a43c707","html_url":"https://github.com/humancto/forge-lang","commit_stats":null,"previous_names":["humancto/forge-lang"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/humancto/forge-lang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humancto%2Fforge-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humancto%2Fforge-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humancto%2Fforge-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humancto%2Fforge-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humancto","download_url":"https://codeload.github.com/humancto/forge-lang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humancto%2Fforge-lang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30208801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bytecode-vm","developer-tools","http","internet-native","jit-compiler","language","natural-language-syntax","programming-language","rust","scripting-language"],"created_at":"2026-03-05T04:05:46.562Z","updated_at":"2026-04-12T07:03:02.939Z","avatar_url":"https://github.com/humancto.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n\n# ⚒️ Forge\n\n### The internet-native programming language that reads like English.\n\nBuilt-in HTTP, databases, crypto, AI, and a JIT compiler.\u003cbr\u003e\n**18 modules. 238+ functions. No extra packages required.**\n\n[![CI](https://github.com/humancto/forge-lang/actions/workflows/ci.yml/badge.svg)](https://github.com/humancto/forge-lang/actions/workflows/ci.yml)\n[![Release](https://img.shields.io/github/v/release/humancto/forge-lang?color=%23ff6b35\u0026style=flat-square)](https://github.com/humancto/forge-lang/releases)\n[![License: MIT](https://img.shields.io/badge/license-MIT-64ffda?style=flat-square)](LICENSE)\n[![Built with Rust](https://img.shields.io/badge/built_with-Rust-%23f74c00?style=flat-square)](https://www.rust-lang.org/)\n[![Tests](https://img.shields.io/badge/tests-1,275_passing-64ffda?style=flat-square)](#project-status)\n[![Stars](https://img.shields.io/github/stars/humancto/forge-lang?color=%23ff6b35\u0026style=flat-square)](https://github.com/humancto/forge-lang/stargazers)\n[![crates.io](https://img.shields.io/crates/v/forge-lang?color=%23ff6b35\u0026style=flat-square)](https://crates.io/crates/forge-lang)\n\n[📥 **Download Book**](https://github.com/humancto/forge-lang/releases/latest/download/programming-forge.pdf) · [📖 **Language Spec**](https://humancto.github.io/forge-lang/spec/) · [🌐 **Website**](https://humancto.github.io/forge-lang/) · [💬 **Discussions**](https://github.com/humancto/forge-lang/discussions) · [🐛 **Issues**](https://github.com/humancto/forge-lang/issues)\n\n\u003c/div\u003e\n\n---\n\n```bash\nbrew install humancto/tap/forge    # install\nforge learn                        # 30 interactive tutorials\nforge run app.fg                   # run a program\n```\n\n---\n\n## ⚡ See It In Action\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n**REST API — 3 lines, zero deps**\n\n```forge\n@server(port: 3000)\n\n@get(\"/hello/:name\")\nfn hello(name: String) -\u003e Json {\n    return { greeting: \"Hello, {name}!\" }\n}\n```\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n**Database + Crypto — built in**\n\n```forge\ndb.open(\":memory:\")\ndb.execute(\"CREATE TABLE users (name TEXT)\")\ndb.execute(\"INSERT INTO users VALUES ('Alice')\")\n\nlet users = db.query(\"SELECT * FROM users\")\nterm.table(users)\n\nsay crypto.sha256(\"password\")\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003e **No framework. No packages. No setup.** Just `forge run`.\n\n---\n\n## 📖 Table of Contents\n\n|                                                      |                                 |                                       |\n| ---------------------------------------------------- | ------------------------------- | ------------------------------------- |\n| [⚡ Quick Example](#-see-it-in-action)               | [🎯 Why Forge?](#-why-forge)    | [📦 Installation](#-installation)     |\n| [🗣️ Dual Syntax](#️-dual-syntax)                      | [🚀 Quick Tour](#-quick-tour)   | [🏗️ Type System](#️-type-system)       |\n| [📚 Standard Library](#-standard-library-18-modules) | [⚡ Performance](#-performance) | [🎮 GenZ Debug Kit](#-genz-debug-kit) |\n| [🔧 CLI](#-cli-commands)                             | [📂 Examples](#-examples)       | [🏛️ Architecture](#️-architecture)     |\n| [📕 Book](#-the-book)                                | [🗺️ Roadmap](#️-roadmap)         | [🤝 Contributing](#-contributing)     |\n\n---\n\n## 🎯 Why Forge?\n\nModern development means installing dozens of packages before writing a single line of logic:\n\n```bash\n# Python: pip install flask requests sqlalchemy bcrypt python-dotenv ...\n# Node:   npm install express node-fetch better-sqlite3 bcrypt csv-parser ...\n# Go:     go get github.com/gin-gonic/gin github.com/mattn/go-sqlite3 ...\n```\n\n**Forge: everything is built in.**\n\n| Task               |    Forge    |    Python     |      Node.js       |        Go        |\n| ------------------ | :---------: | :-----------: | :----------------: | :--------------: |\n| REST API server    | **3 lines** |  12 + flask   |    15 + express    |     25 lines     |\n| Query SQLite       | **2 lines** |    5 lines    | 8 + better-sqlite3 | 12 + go-sqlite3  |\n| SHA-256 hash       | **1 line**  |    3 lines    |      3 lines       |     5 lines      |\n| HTTP GET request   | **1 line**  | 3 + requests  |   5 + node-fetch   |     10 lines     |\n| Parse CSV          | **1 line**  |    4 lines    |   6 + csv-parser   |     8 lines      |\n| Terminal table     | **1 line**  | 5 + tabulate  |   4 + cli-table    | 10 + tablewriter |\n| Retry with backoff | **1 line**  | 12 + tenacity |  15 + async-retry  |  20 + retry-go   |\n\n\u003e 💡 **Forge ships with 0 external dependencies needed** for HTTP, databases, crypto, CSV, regex, terminal UI, shell integration, AI, and more.\n\n---\n\n## 📦 Installation\n\n```bash\n# Homebrew (macOS \u0026 Linux) — recommended\nbrew install humancto/tap/forge\n\n# Cargo (Rust)\ncargo install forge-lang\n\n# Install script\ncurl -fsSL https://raw.githubusercontent.com/humancto/forge-lang/main/install.sh | bash\n\n# From source\ngit clone https://github.com/humancto/forge-lang.git \u0026\u0026 cd forge-lang \u0026\u0026 cargo install --path .\n```\n\n**Verify:**\n\n```bash\nforge version          # → forge 0.4.3\nforge learn            # 30 interactive tutorials\nforge                  # start REPL\n```\n\n---\n\n## 🗣️ Dual Syntax\n\nWrite it your way. Both compile identically.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n**✦ Natural — reads like English**\n\n```forge\nset name to \"Forge\"\nsay \"Hello, {name}!\"\n\ndefine greet(who) {\n    say \"Welcome, {who}!\"\n}\n\nset mut score to 0\nrepeat 5 times {\n    change score to score + 10\n}\n\nif score \u003e 40 {\n    yell \"You win!\"\n} otherwise {\n    whisper \"try again...\"\n}\n```\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n**⚙ Classic — familiar syntax**\n\n```forge\nlet name = \"Forge\"\nprintln(\"Hello, {name}!\")\n\nfn greet(who) {\n    println(\"Welcome, {who}!\")\n}\n\nlet mut score = 0\nfor i in range(0, 5) {\n    score += 10\n}\n\nif score \u003e 40 {\n    println(\"You win!\")\n} else {\n    println(\"try again...\")\n}\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e📋 Full syntax mapping (click to expand)\u003c/strong\u003e\u003c/summary\u003e\n\n| Concept    | Classic                    | Natural                     |\n| ---------- | -------------------------- | --------------------------- |\n| Variables  | `let x = 5`                | `set x to 5`                |\n| Mutable    | `let mut x = 0`            | `set mut x to 0`            |\n| Reassign   | `x = 10`                   | `change x to 10`            |\n| Functions  | `fn add(a, b) { }`         | `define add(a, b) { }`      |\n| Output     | `println(\"hi\")`            | `say` / `yell` / `whisper`  |\n| Else       | `else { }`                 | `otherwise { }` / `nah { }` |\n| Async      | `async fn x() { }`         | `forge x() { }`             |\n| Await      | `await expr`               | `hold expr`                 |\n| Structs    | `struct Foo { }`           | `thing Foo { }`             |\n| Methods    | `impl Foo { }`             | `give Foo { }`              |\n| Interfaces | `interface Bar { }`        | `power Bar { }`             |\n| Construct  | `Foo { x: 1 }`             | `craft Foo { x: 1 }`        |\n| Fetch      | `fetch(\"url\")`             | `grab resp from \"url\"`      |\n| Loops      | `for i in range(0, 3) { }` | `repeat 3 times { }`        |\n| Destruct   | `let {a, b} = obj`         | `unpack {a, b} from obj`    |\n\n\u003c/details\u003e\n\n---\n\n## 🚀 Quick Tour\n\n### Variables \u0026 Functions\n\n```forge\nlet name = \"Forge\"              // immutable\nlet mut count = 0               // mutable\ncount += 1\n\nfn add(a, b) { return a + b }\nlet double = fn(x) { x * 2 }   // lambda with implicit return\n```\n\n### 🎤 The Output Trio\n\n```forge\nsay \"Normal volume\"              // standard output\nyell \"LOUD AND PROUD!\"          // UPPERCASE + !\nwhisper \"quiet and gentle\"       // lowercase + ...\n```\n\n### Control Flow \u0026 Pattern Matching\n\n```forge\nif score \u003e 90 { say \"A\" }\notherwise if score \u003e 80 { say \"B\" }\notherwise { say \"C\" }\n\n// When guards\nlet label = when temp {\n    \u003e 100 -\u003e \"Boiling\"\n    \u003e 60  -\u003e \"Warm\"\n    else  -\u003e \"Cold\"\n}\n\n// Algebraic data types + pattern matching\ntype Shape = Circle(Float) | Rect(Float, Float)\nmatch Circle(5.0) {\n    Circle(r) =\u003e say \"Area = {3.14 * r * r}\"\n    Rect(w, h) =\u003e say \"Area = {w * h}\"\n}\n```\n\n### 🔑 Innovation Keywords\n\n```forge\nsafe { risky_function() }                         // returns null on error\nmust parse_config(\"app.toml\")                     // crash with clear message\ncheck email is not empty                          // declarative validation\nretry 3 times { fetch(\"https://api.example.com\") } // automatic retry\ntimeout 5 seconds { long_operation() }             // enforced time limit\nwait 2 seconds                                     // sleep with units\n```\n\n### Collections \u0026 Functional\n\n```forge\nlet nums = [1, 2, 3, 4, 5]\nlet result = nums\n    .filter(fn(x) { x % 2 == 0 })\n    .map(fn(x) { x * 2 })\nsay result   // [4, 8]\n\nlet user = { name: \"Alice\", age: 30 }\nsay pick(user, [\"name\"])            // { name: \"Alice\" }\nsay get(user, \"email\", \"N/A\")      // safe access with default\n```\n\n### Error Handling\n\n```forge\nfn safe_divide(a, b) {\n    if b == 0 { return Err(\"division by zero\") }\n    return Ok(a / b)\n}\n\nmatch safe_divide(10, 0) {\n    Ok(val) =\u003e say \"Got: {val}\"\n    Err(msg) =\u003e say \"Error: {msg}\"\n}\n\n// Propagate with ?\nfn compute(input) {\n    let n = parse_int(input)?\n    return Ok(n * 2)\n}\n```\n\n---\n\n## 🏗️ Type System\n\nDefine data types, attach behavior, enforce contracts, and compose with delegation.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n**✦ Natural — thing / give / power**\n\n```forge\nthing Person {\n    name: String,\n    age: Int,\n    role: String = \"member\"\n}\n\ngive Person {\n    define greet(it) {\n        return \"Hi, I'm \" + it.name\n    }\n}\n\npower Describable {\n    fn describe() -\u003e String\n}\n\ngive Person the power Describable {\n    define describe(it) {\n        return it.name + \" (\" + it.role + \")\"\n    }\n}\n\nset p to craft Person { name: \"Alice\", age: 30 }\nsay p.greet()                      // Hi, I'm Alice\nsay satisfies(p, Describable)      // true\n```\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n**⚙ Classic — struct / impl / interface**\n\n```forge\nstruct Person {\n    name: String,\n    age: Int,\n    role: String = \"member\"\n}\n\nimpl Person {\n    fn greet(it) {\n        return \"Hi, I'm \" + it.name\n    }\n}\n\ninterface Describable {\n    fn describe() -\u003e String\n}\n\nimpl Describable for Person {\n    fn describe(it) {\n        return it.name + \" (\" + it.role + \")\"\n    }\n}\n\nlet p = Person { name: \"Alice\", age: 30 }\nprintln(p.greet())                 // Hi, I'm Alice\nprintln(satisfies(p, Describable)) // true\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### Composition with `has`\n\n```forge\nthing Address { street: String, city: String }\nthing Employee { name: String, has addr: Address }\n\ngive Address {\n    define full(it) { return it.street + \", \" + it.city }\n}\n\nset emp to craft Employee {\n    name: \"Charlie\",\n    addr: craft Address { street: \"123 Main St\", city: \"Portland\" }\n}\n\nsay emp.city        // delegated to emp.addr.city → \"Portland\"\nsay emp.full()      // delegated to emp.addr.full() → \"123 Main St, Portland\"\n```\n\n| Keyword                 | Purpose                                     |\n| ----------------------- | ------------------------------------------- |\n| `thing` / `struct`      | Define a data type                          |\n| `craft`                 | Construct an instance                       |\n| `give` / `impl`         | Attach methods to a type                    |\n| `power` / `interface`   | Define a behavioral contract                |\n| `has`                   | Embed a type with field + method delegation |\n| `it`                    | Self-reference in methods                   |\n| `satisfies(obj, Power)` | Check if an object satisfies a contract     |\n\n---\n\n## 📚 Standard Library (18 Modules)\n\nEvery module is available from line 1. No imports. No installs.\n\n### 🌐 HTTP Server \u0026 Client\n\n```forge\n// Server — 3 lines to production\n@server(port: 3000)\n@get(\"/users/:id\")\nfn get_user(id: String) -\u003e Json {\n    return db.query(\"SELECT * FROM users WHERE id = \" + id)\n}\n\n// Client — just fetch\nlet resp = fetch(\"https://api.github.com/repos/rust-lang/rust\")\nsay resp.json.stargazers_count\n```\n\n### 🗄️ Database (SQLite + PostgreSQL + MySQL)\n\n```forge\ndb.open(\":memory:\")\ndb.execute(\"CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)\")\ndb.execute(\"INSERT INTO users (name) VALUES ('Alice')\")\nlet users = db.query(\"SELECT * FROM users\")\nterm.table(users)\n\n// MySQL — parameterized queries, connection pooling\nlet conn = mysql.connect(\"mysql://root:pass@localhost/mydb\")\nlet users = mysql.query(conn, \"SELECT * FROM users WHERE age \u003e ?\", [21])\nmysql.close(conn)\n```\n\n### 🔐 JWT Authentication\n\n```forge\nlet token = jwt.sign({ user_id: 123, role: \"admin\" }, \"secret\", { expires: \"1h\" })\nlet claims = jwt.verify(token, \"secret\")\nsay claims.user_id       // 123\nsay jwt.valid(token, \"secret\")  // true\n```\n\n### 🐚 Shell Integration\n\n```forge\nsay sh(\"whoami\")                           // quick stdout\nlet files = sh_lines(\"ls /etc | head -5\")  // stdout as array\nif sh_ok(\"which docker\") { say \"Docker installed\" }\nlet sorted = pipe_to(csv_data, \"sort\")     // pipe Forge data into shell\n```\n\n### 🖥️ Terminal UI\n\n```forge\nterm.table(data)                   // formatted tables\nterm.sparkline([1, 5, 3, 8, 2])   // inline charts ▁▅▃█▂\nterm.bar(\"Progress\", 75, 100)     // progress bars\nsay term.red(\"Error!\")             // 🔴 colored output\nsay term.green(\"Success!\")         // 🟢\nterm.banner(\"FORGE\")               // ASCII art banner\n```\n\n### 🔐 Crypto + 📄 CSV + 📁 File System\n\n```forge\nsay crypto.sha256(\"forge\")                    // hash anything\nsay crypto.base64_encode(\"secret\")             // encode/decode\n\nlet data = csv.read(\"users.csv\")               // parse CSV files\ncsv.write(\"output.csv\", processed_data)         // write CSV\n\nfs.write(\"config.json\", json.stringify(data))   // file I/O\nlet exists = fs.exists(\"config.json\")\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e📋 All 18 modules at a glance (click to expand)\u003c/strong\u003e\u003c/summary\u003e\n\n| Module     | Functions                                                                                                                            |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| **math**   | sqrt, pow, abs, sin, cos, tan, pi, e, random, random_int, clamp, floor, ceil, round                                                  |\n| **fs**     | read, write, append, exists, list, mkdir, copy, rename, remove, size, lines, dirname, basename, join_path, is_dir, is_file, temp_dir |\n| **crypto** | sha256, md5, base64_encode/decode, hex_encode/decode                                                                                 |\n| **db**     | SQLite — open, query, execute, close (parameterized queries supported)                                                               |\n| **pg**     | PostgreSQL — connect, query, execute, close (parameterized queries supported)                                                        |\n| **mysql**  | MySQL — connect, query, execute, close (parameterized queries, connection pooling)                                                   |\n| **jwt**    | sign, verify, decode, valid (HS256/384/512, RS256, ES256)                                                                            |\n| **json**   | parse, stringify, pretty                                                                                                             |\n| **csv**    | parse, stringify, read, write                                                                                                        |\n| **regex**  | test, find, find_all, replace, split                                                                                                 |\n| **env**    | get, set, has, keys                                                                                                                  |\n| **log**    | info, warn, error, debug                                                                                                             |\n| **term**   | colors, table, sparkline, bar, banner, box, gradient, countdown, confirm, menu                                                       |\n| **http**   | get, post, put, delete, patch, head, download, crawl                                                                                 |\n| **io**     | prompt, print, args_parse, args_get, args_has                                                                                        |\n| **exec**   | run_command                                                                                                                          |\n| **time**   | now, format, parse, sleep, elapsed                                                                                                   |\n| **npc**    | Fake data — name, email, username, phone, number, pick, bool, sentence, id, color, ip, url, company                                  |\n\n\u003c/details\u003e\n\n---\n\n## ⚡ Performance\n\nThree execution tiers — pick your tradeoff:\n\n| Engine         |  fib(30) |   vs Python    | Best For                              |\n| -------------- | -------: | :------------: | ------------------------------------- |\n| 🔥 `--jit`     | **10ms** | **11x faster** | Compute-heavy hot functions           |\n| ⚙️ `--vm`      |    252ms |   ~2x slower   | General bytecode execution            |\n| 📦 Interpreter |  2,300ms |  ~20x slower   | Full feature set + all 238+ functions |\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e📊 Full cross-language benchmark — fib(30)\u003c/strong\u003e\u003c/summary\u003e\n\n| Language                |     Time | Relative |\n| ----------------------- | -------: | -------: |\n| Rust 1.91 (-O)          |   1.46ms | baseline |\n| C (clang -O2)           |   1.57ms |    ~1.1x |\n| Go 1.23                 |   4.24ms |    ~2.9x |\n| Scala 2.12 (JVM)        |   4.33ms |    ~3.0x |\n| Java 1.8 (JVM)          |   5.77ms |    ~4.0x |\n| JavaScript (Node 22/V8) |   9.53ms |    ~6.5x |\n| **Forge (JIT)**         | **10ms** |  **~7x** |\n| Python 3                |    114ms |     ~79x |\n| Forge (VM)              |    252ms |    ~173x |\n| Forge (interpreter)     |  2,300ms |  ~1,575x |\n\nThe JIT compiles hot functions to native code via [Cranelift](https://cranelift.dev/), placing Forge alongside Node.js/V8 for recursive workloads.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🌐 HTTP Server benchmark — 20,000 requests / 200 concurrent (GET /ping → JSON)\u003c/strong\u003e\u003c/summary\u003e\n\n| Server                         |    Req/sec | Avg Latency |    vs Python    |\n| ------------------------------ | ---------: | ----------: | :-------------: |\n| **Forge** (axum + interpreter) | **28,017** |      7.1 ms | **9.8x faster** |\n| Rust / Axum (native async)     |     24,853 |      8.0 ms |   8.7x faster   |\n| Python / Flask (threaded)      |      2,854 |     70.0 ms |      1.0x       |\n\nForge's HTTP server is built on axum + tokio — the same stack powering production Rust services. For typical JSON API endpoints, Forge matches raw Rust throughput while giving you a 4-line handler instead of 40.\n\nTested with ApacheBench (`ab -n 20000 -c 200`) on localhost, macOS. Run your own:\n\n```bash\n# Terminal 1\nforge run examples/bench_server.fg\n\n# Terminal 2\nforge run examples/bench_client.fg     # Forge-native client with stats\nab -n 20000 -c 200 http://127.0.0.1:9090/ping   # or use ab/wrk/oha\n```\n\n\u003c/details\u003e\n\n---\n\n## 🎮 GenZ Debug Kit\n\nDebugging should have personality. Forge ships both classic and GenZ-flavored debug tools.\n\n```forge\nsus(my_object)         // 🔍 inspect any value (= debug/inspect)\nbruh(\"it broke\")       // 💀 crash with a message (= panic)\nbet(score \u003e 0)         // 💯 assert it's true (= assert)\nno_cap(result, 42)     // 🧢 assert equality (= assert_eq)\nick(is_deleted)        // 🤮 assert it's false (= assert_false)\n```\n\n**Plus execution tools:**\n\n```forge\ncook { expensive_op() }           // ⏱️ profile execution time\nslay 1000 { fibonacci(20) }      // 📊 benchmark (1000 iterations)\nghost { might_fail() }           // 👻 silent execution (swallow errors)\nyolo { send_analytics(data) }    // 🚀 fire-and-forget async\n```\n\n---\n\n## 🔧 CLI Commands\n\n| Command               | What It Does             |\n| --------------------- | ------------------------ |\n| `forge run \u003cfile\u003e`    | Run a program            |\n| `forge`               | Start REPL               |\n| `forge -e '\u003ccode\u003e'`   | Evaluate inline          |\n| `forge learn [n]`     | 30 interactive tutorials |\n| `forge new \u003cname\u003e`    | Scaffold a project       |\n| `forge test [dir]`    | Run tests                |\n| `forge fmt [files]`   | Format code              |\n| `forge build \u003cfile\u003e`  | Compile to `.fgc` bytecode |\n| `forge build --native \u003cfile\u003e` | Build a native launcher executable |\n| `forge install \u003csrc\u003e` | Install a package        |\n| `forge lsp`           | Language server          |\n| `forge chat`          | AI assistant             |\n| `forge version`       | Version info             |\n\n---\n\n## 📂 Examples\n\n```bash\nforge run examples/hello.fg        # basics\nforge run examples/natural.fg      # natural syntax\nforge run examples/types.fg        # type system — thing/give/power/craft/has\nforge run examples/api.fg          # REST API server\nforge run examples/data.fg         # data processing + visualization\nforge run examples/devops.fg       # system automation\nforge run examples/showcase.fg     # everything in one file\nforge run examples/functional.fg   # closures, recursion, higher-order\nforge run examples/adt.fg          # algebraic data types + matching\nforge run examples/result_try.fg   # error handling with ?\nforge run examples/jwt_demo.fg     # JWT authentication\nforge run examples/mysql_demo.fg   # MySQL database CRUD\n```\n\n---\n\n## 🏛️ Architecture\n\n```\nSource (.fg) → Lexer → Tokens → Parser → AST → Type Checker\n                                                     ↓\n                            ┌────────────────────────┼────────────────────────┐\n                            ↓                        ↓                        ↓\n                       Interpreter              Bytecode VM              JIT Compiler\n                     (full features)           (--vm flag)             (--jit flag)\n                            ↓                        ↓                        ↓\n                     Runtime Bridge            Mark-Sweep GC          Cranelift Native\n                  (axum, reqwest, tokio,       Green Threads              Code\n                   rusqlite, postgres)\n```\n\n**~26,000 lines of Rust.** Zero `unsafe` blocks in application code.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🔩 Core dependencies\u003c/strong\u003e\u003c/summary\u003e\n\n| Crate                                              | Purpose         |\n| -------------------------------------------------- | --------------- |\n| [axum](https://github.com/tokio-rs/axum)           | HTTP server     |\n| [tokio](https://tokio.rs)                          | Async runtime   |\n| [reqwest](https://github.com/seanmonstar/reqwest)  | HTTP client     |\n| [cranelift](https://cranelift.dev/)                | JIT compilation |\n| [rusqlite](https://github.com/rusqlite/rusqlite)   | SQLite          |\n| [ariadne](https://github.com/zesterer/ariadne)     | Error reporting |\n| [rustyline](https://github.com/kkawakam/rustyline) | REPL            |\n| [clap](https://github.com/clap-rs/clap)            | CLI parsing     |\n\n\u003c/details\u003e\n\n---\n\n## 📕 The Book\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/humancto/forge-lang/releases/latest/download/programming-forge.pdf\"\u003e\n    \u003cimg src=\"docs/cover.jpeg\" alt=\"Programming Forge — The Internet-Native Language That Reads Like English\" width=\"280\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eProgramming Forge: The Internet-Native Language That Reads Like English\u003c/strong\u003e\u003cbr\u003e\n  36 chapters · Foundations · Standard Library · Real-World Projects · Internals\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://github.com/humancto/forge-lang/releases/latest/download/programming-forge.pdf\"\u003e📥 Download PDF (Free)\u003c/a\u003e · \u003ca href=\"docs/PROGRAMMING_FORGE.md\"\u003e📖 Read Online\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 📊 Project Status\n\nForge is **v0.4.3**. The language, interpreter, and standard library are stable; VM/JIT backends are fast but still subset runtimes.\n\n| Metric                   |                        Value |\n| ------------------------ | ---------------------------: |\n| Lines of Rust            |                      ~27,000 |\n| Standard library modules |                           18 |\n| Built-in functions       |                         238+ |\n| Keywords                 |                          80+ |\n| Tests passing            | 1,275 (644 Rust + 631 Forge) |\n| Interactive lessons      |                           30 |\n| Example programs         |                           18 |\n| Dependencies (CVEs)      |          344 crates (0 CVEs) |\n\n### Known Limitations\n\n\u003e [!NOTE]\n\u003e Forge is a young language. These are documented, not hidden.\n\n- **Parameterized SQL queries supported** — pass a params array as the second argument to `db.query`, `db.execute`, `pg.query`, `pg.execute`, and `mysql.query` / `mysql.execute` to safely bind user input and prevent SQL injection.\n- **Three execution tiers with different trade-offs** — The interpreter is the full language runtime. Use `--vm` for supported bytecode execution, `--jit` for integer-heavy hot paths, and `--profile` to inspect VM execution.\n- **VM/JIT feature gap** — VM and JIT now fail fast on unsupported language features instead of silently compiling partial behavior. Use the default interpreter for full stdlib, HTTP, database, AI, and advanced language features.\n- **`forge build --native` is a launcher today** — it produces a native executable wrapper that shells back into the Forge runtime. Standalone AOT binaries are still on the roadmap.\n- **`regex` functions** take `(text, pattern)` argument order, not `(pattern, text)`.\n\n---\n\n## 🗺️ Roadmap\n\n| Version     | Focus                                                                                             |\n| ----------- | ------------------------------------------------------------------------------------------------- |\n| **v0.3** ✅ | Type system (thing/power/give/craft/has), 73 new functions, GenZ debug kit, NPC module, 822 tests |\n| **v0.4** ✅ | JWT auth, MySQL, parameterized SQL (all DBs), CORS, PG TLS, 18 modules, 1,019 tests               |\n| **v0.5**    | Backend parity, package foundations, richer LSP                                                    |\n| **v0.6**    | Stronger typing, permissions, profiling and benching                                               |\n| **v0.7**    | Standalone native compilation groundwork                                                           |\n| **v1.0**    | Stable API, compatibility guarantees, production hardening                                         |\n\nNear-term execution focus: semantic parity across backends, package/module correctness, stronger typing, better editor tooling, and a path from launcher-based native builds to real standalone binaries.\n\nSee [ROADMAP.md](ROADMAP.md) for the public roadmap. Have ideas? [Open an issue](https://github.com/humancto/forge-lang/issues).\n\n---\n\n## ✏️ Editor Support\n\n**VS Code** — Syntax highlighting available in [editors/vscode/](editors/vscode/):\n\n```bash\ncp -r editors/vscode ~/.vscode/extensions/forge-lang\n```\n\n**LSP** — Built-in language server:\n\n```bash\nforge lsp\n```\n\nConfigure your editor's LSP client to use `forge lsp` as the command.\n\n---\n\n## 🤝 Contributing\n\n```bash\ngit clone https://github.com/humancto/forge-lang.git\ncd forge-lang\ncargo build \u0026\u0026 cargo test\nforge run examples/showcase.fg\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the architecture guide and PR guidelines. See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for community standards.\n\n---\n\n## 🔒 Security\n\nTo report a security vulnerability, please email the maintainers directly instead of opening a public issue. See [SECURITY.md](SECURITY.md).\n\n---\n\n## 📄 License\n\n[MIT](LICENSE)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Stop installing. Start building.**\n\nBuilt by [**HumanCTO**](https://www.humancto.com) · [GitHub](https://github.com/humancto) · [LinkedIn](https://www.linkedin.com/in/archithr/)\n\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumancto%2Fforge-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumancto%2Fforge-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumancto%2Fforge-lang/lists"}