The AI-Native Systems Language.
FORGE is the world's first compiled language with AI as a native stdlib primitive.
No imports. No pip. No boilerplate. Just ai_ask().
What's New in v0.4.0
- 🤖 AI stdlib syntax highlighting —
ai_ask,ai_classify,ai_translate,ai_sentiment,ai_generatehighlighted as builtins - 📝 31 code snippets including 4 new AI workflow snippets
- 🔤 String builtins —
str_upper,str_lower,str_trim,str_replace,str_split - 🔢 Math builtins —
math_pow,math_floor,math_sin,math_cos,math_random - ⚙️ Env builtins —
env_get,env_set - 🆕 AI model + API key settings in VS Code settings
Features
Syntax Highlighting
Full highlighting for all FORGE constructs:
- Keywords:
fn,let,var,if,for,while,return,async,await,spawn - Types:
i32,i64,f64,str,bool,void - Annotations:
@parallel,@gpu,@async - All 50+ builtin functions including the complete AI stdlib
Code Snippets (31 total)
| Prefix | Description |
|---|---|
fn |
Function definition |
ai_ask |
AI question builtin |
ai_classify |
Text classification |
ai_pipeline |
Translate → Sentiment pipeline |
ai_generate |
Code/text generation |
str_ops |
String manipulation |
env_get |
Environment variable |
pfn |
@parallel function |
http |
HTTP server |
sdl |
SDL2 game window |
region |
Memory region block |
spawn |
Async spawn |
trait |
Trait definition |
impl |
Trait implementation |
Quick Start
fn main() -> void {
ai_set_key("your-deepseek-or-openai-key")
// Ask AI anything — native compiled call
let answer = ai_ask("What is quantum computing?", "")
print(answer)
// Classify text — zero-shot, no training
let label = ai_classify("Win $1000!", "spam,important,newsletter")
print(label)
// String builtins
let up = str_upper("hello forge")
print(up) // HELLO FORGE
// Env vars
let home = env_get("HOME")
print(home)
}
Compile and run:
forge build main.forge -o app && ./app
Platform Support
| Platform | Target | Status |
|---|---|---|
| Linux x86_64 | native | ✅ |
| Windows x64 | --target windows |
✅ |
| Android/ARM64 | --target aarch64 |
✅ |
| Web/WASM | --target web |
✅ |
| macOS | --target macos |
✅ |
Settings
| Setting | Default | Description |
|---|---|---|
forge.compiler.path |
"" |
Path to forge binary |
forge.compiler.checkOnSave |
true |
Type-check on save |
forge.ai.defaultModel |
deepseek-chat |
Default AI model for builtins |
forge.ai.apiKey |
"" |
API key for AI builtins |
Why FORGE?
FORGE is the only compiled language where:
ai_ask()is a language builtin — not a library@parallelauto-parallelises any loop — no threading coderegion { }gives memory safety without GC- HTTP server works with zero imports
- Native speed + Python ease for AI work
Links
- 🌐 forgelang.dev — Main site
- 🧪 ide.forgelang.dev — Online IDE
- 📚 gallery.forgelang.dev — 26 examples
- 📖 docs.forgelang.dev — Documentation
- 💻 GitHub
FORGE v0.4.0 — The AI-Native Systems Language