
CHUD
CHUD native programming language, compiler, and CHUD Studio IDE
Project documentation
CHUD · 0.1.0-alpha
ChudGPT terminology: In ChudGPT's project terminology, AI stands for Artificial Idiot. It does not mean Artificial Intelligence, and the project is not presented as SI.
CHUD is a native programming language with a C++20 compiler and its own desktop development environment, CHUD Studio. This repository is an initial working milestone of the larger language brief, not a completed ecosystem.
The compiler lexes and parses real .chud / .CHUD source, checks types and scopes, emits LLVM IR, and links native executables for the host platform. Console programs support Windows x64, Linux x64, and macOS on Apple silicon and Intel. Generated programs run without Node.js, .NET, or Studio.
Download CHUD Studio
Get the Windows setup EXE, Linux DEB, or macOS DMG from the Studio release. See the installation guide for platform prerequisites and the first run.
What works
- Native compilation of
int,bool, strings, functions, immutable/mutable locals, literal constants, conditionals, ranges, loops, short circuit logic, and console output. - 62 native library functions: Text, Math, Convert, IO, Path, Random, Time, integer Collections, original Forge/Spark helpers, and Windows GUI/GUILayout. See libraries and GUI.
chud new,build,run,check,test, andclean, including multi-file projects and debug/release optimization choices.- Studio's local Monaco editor, file explorer, source tabs, split editor, saving/autosave, compiler diagnostics, Build/Run/Stop, command execution through PowerShell, and persisted settings.
- Settings → Discord Rich Presence: a simple enable toggle with a built-in CHUD Studio identity, project/filename privacy controls, elapsed time, reconnection and clearing on disable/exit. Defaults off.
- Four ChudGPT model adapters, explicit context attachments, cancellation, per-model conversations, Markdown/code copying, and a diff review before applying a proposed file replacement.
- Basic assistant in the assistant pane: ten offline starter programs, source preview, customizable titles, safe new-file creation and reviewed replacements. No AI or network calls. The separate ChudGPT AI tab remains available.
- Visual Studio 2022-inspired compact dark chrome, Solution Explorer, native File/Edit/View/Build/Tools menus, command search (Ctrl+Q), build shortcuts and cursor status.
- A small compiler-backed language server with document diagnostics, incremental edits, keyword/builtin completion and function symbols.
Build on Windows
Requirements: Windows x64; Visual Studio 2022 Desktop development with C++ (including Windows SDK and CMake); Node.js 20.11+ with npm; LLVM 20+ with clang.exe available via PATH, CHUD_CLANG, or .tools/llvm/bin/clang.exe.
git clone https://github.com/ASTRA228b/CHUD.git
cd CHUD
powershell -ExecutionPolicy Bypass -File scripts/build.ps1If LLVM is missing, the optional bootstrap downloads LLVM 20.1.8 from its official GitHub release, verifies a pinned checksum, and extracts it locally. It requires 7-Zip and does not install LLVM system-wide:
powershell -ExecutionPolicy Bypass -File scripts/bootstrap.ps1 -DownloadLLVMRun CHUD Studio.cmd after building, or:
npm start --prefix studioCreate or refresh a desktop shortcut after building Studio:
powershell -File scripts/create-shortcut.ps1The shortcut uses the CHUD icon and opens this checkout. examples/LibraryTour demonstrates the standard libraries; examples/ImmediateGUI opens an interactive native window. Studio's Basic assistant can also create starter code without a model connection.
The native command launchers are in build/bin. For this terminal session:
$env:Path = "$PWD\build\bin;$env:Path"
chud new MyApplication
cd MyApplication
chud build
chud runExpected application output: Hello from CHUD!. Build output is shown only after the compiler and linker return success.
For the supplied sample, run chud run inside examples/HelloWorld. examples/HelloWorld/Program.chud is also a standalone copy of the required first program; the project CLI compiles files under src/.
Discord Rich Presence
Open Studio settings with Ctrl+,, enable Show CHUD Studio on Discord, and save. Keep Discord desktop running and allow activity sharing in Discord. Studio includes its own registered application identity, so no application ID, bot token, or account setup is required.
Project and filename sharing default off; each can be enabled separately. Only basenames are shared, alongside Editing/Building/Running/Idle and optional session time. Source code, absolute paths and chat contents are excluded. Advanced Discord options lets developers optionally use a custom application ID. Existing custom IDs are preserved when upgrading. The automated IPC and UI tests use a local test server and do not post to your Discord account.
Validation
npm test
npm test --prefix studio
npm run build --prefix studio
cd studio
node tests-ui/smoke.mjsCompiler tests inspect real PE headers and run emitted programs, including arithmetic, functions, scopes, loops, short circuiting, runtime failure paths, multi-file compilation and rejected programs. Studio tests exercise settings persistence, real local IPC framing/retries/throttling/clear, model contracts and failures. The Electron UI test uses an isolated temporary profile/project to verify the editor, Discord controls, native Run and PowerShell output.
Current limits and next steps
Implemented types are int (32-bit signed), bool, immutable UTF-8 strings, typed integer list, and void. Library strings/lists use bounded process-lifetime allocations (64 MiB total, no garbage collection). Module headers and builtin library imports are accepted, but user-module namespaces, package imports, other numeric types, user allocation, structs/classes, traits, generics, Result, generic collections, async and a debugger are not implemented. The language tooling has no package registry, publish command, or formatter.
Debug mode currently means unoptimized code; source-level debug metadata and breakpoints are not available. Command execution is a real PowerShell process per submitted command, not a persistent interactive PTY. Studio diagnostics currently check the active document independently; use Check/Build for cross-file validation. The standalone LSP is not yet Studio's transport for editor services. ChudGPT history is held in memory; model mappings follow the documented IDs but endpoint reachability does not prove inference readiness.
Native launchers currently locate resources in the source checkout, so CI artifacts are development artifacts rather than standalone distributions. Next: connect Studio to the LSP as its common language-service transport, improve cross-file diagnostics, introduce module resolution and additional numeric types, then extend the runtime before advanced types and debugging.
Read Language, Libraries, GUI, Compiler and runtime, Studio, ChudGPT, Architecture, and Roadmap.
Releases & changelogs
CHUD Studio 0.1.0-alpha
studio-v0.1.0-alpha · 2026-11-10
Release notes
CHUD Studio 0.1.0-alpha
CHUD Studio includes an editor, a native CHUD compiler, the runtime sources, an offline Basic assistant, and an optional ChudGPT assistant and Discord Rich Presence. On first launch, Studio creates a writable HelloCHUD project in its application data folder.
| Platform | Installer | Tools needed to build and run CHUD programs |
| --- | --- | --- |
| Windows 10/11 x64 | Windows x64 Setup EXE | LLVM 20 or later with clang on PATH and Visual Studio 2022 Build Tools with Desktop development with C++ and a Windows SDK |
| macOS 13 or later, Apple silicon or Intel | DMG matching your processor | Xcode Command Line Tools, installed with xcode-select --install |
| Ubuntu 24.04 or Debian 13 x64 | Linux x64 DEB | Install clang and build-essential using your package manager |
Run Setup on Windows. On macOS, open the DMG and drag CHUD Studio to Applications. On Linux, run sudo apt install ./CHUD-Studio-0.1.0-alpha-Linux-amd64.deb from the download folder. The Windows installer is unsigned. The macOS apps use ad hoc signing.
Open Studio and select Run to build HelloCHUD. Editing and syntax diagnostics use the bundled compiler. Build and Run also use your system toolchain. Set CHUD_CLANG before launching Studio to choose a specific Clang executable.
Console projects build on all three operating systems. CHUD.GUI and CHUD.GUILayout use Win32 and build on Windows. New projects use target = "native". For an older console project with target = "windows-x64", change it to "native" to build on Linux or macOS.
Release assets include SHA-256 checksums. CHUD documentation
Public GitHub metadata is cached for up to an hour. Saved snapshots are used during outages. Nothing here verifies current-game compatibility.