Develop, compile, and ship
at native machine speed.
CP fuses TypeScript’s elegance, Rust’s memory safety, and Zig’s native performance into one all-in-one toolchain (cpc + cap) — built for high-concurrency AI Agents, APIs, and systems software.
curl -fsSL https://raw.githubusercontent.com/cp-lang/cp/main/install.sh | sh
$ cap from -ts ./legacy-api -o my-agent # or -rs for Rust
✓ Migrated 14 TS modules → native CP with cap.json
$ cap add @cap/llama @cap/duckdb @cap/yyjson
✓ Linked @cap/llama, @cap/duckdb, @cap/yyjson (prebuilt)
$ cap run --watch -m src/main.cp
→ [modular-obj] 9 cached, 1 rebuilt in 2.4ms · watching...
✓ Serving HTTP/1.1 on :3000 (19.3 MB RSS, zero GC)
$ cap fmt --check && cap lint --dead && cap test
✓ 0 dead symbols · All purity gates PASS
Real Benchmarks, Same Machine
Measured on Intel Xeon Platinum 8175M · Linux x86_64 (-OReleaseFast) vs Bun 1.3.14 & Node v26.1.0. Reproducible via bench/vs_web_frameworks/ & bench/vs_runtimes/.
Write like TypeScript. Run like C & Rust.
Zero garbage collector pauses. Explicit 3-mode ownership (read-only / * / move) with automatic ~init() RAII.
One Binary. Everything Included.
Inspired by Bun, Cargo, and Zig — zero external build scripts or CMake headaches.
⚡ cap.json 2.0 & Workspaces
Four clean 3-letter dependency keys: dep, dev, bin (C/C++ static), and sys (dynamic). Full workspaces glob & workspace:* support.
🌳 AST On-Demand Tree-Shaking
cpc tracks actually referenced external packages via // @cap-used-pkg:. Unused dependencies add 0 bytes to your final binary.
🚀 Parallel .o Cache (-m)
Content-hashed .cap/obj/*.o cache with multi-core parallel compilation and incremental linking. Add --low for low-memory serial mode.
📦 Dual-Format Pack & Publish
Built-in Zstd + libdeflate. Pack split .tar.zst with cap pack --strip, or publish RFC 1952 .tgz directly to npm / Verdaccio via cap publish.
🤖 AI-First Self-Healing Errors
Every diagnostic provides cause, help, and exact fix suggestion — plus cpc fix, cap fmt, and cap lint.
🔄 One-Click Project Migration
Convert existing TypeScript or Rust codebases into idiomatic native CP projects in one command with cap from -ts and cap from -rs.
🔥 Watch Mode & Dead-Code Lint
Instant incremental hot-reload via cap run --watch paired with AST-level unused symbol & dead-code detection via cap lint --dead.
🌐 559K QPS HTTP & 8.71M/s WS
Zero-GC multi-core TCP HTTP/1.1 (19.3 MB RSS) and RFC 6455 WebSocket broadcast (2.48 MB RSS) — up to 37.9x lower memory than Node.
🛡️ Built-in Batteries
Embedded SQLite 3.54.1, SIMD+LazyDFA Regex, Sans-IO WebRTC (cap:rtc), HTTP/1/2/3, PG/MySQL/Redis, IANA TZ, LEB128, and ELF/COFF/Mach-O/SPIR-V.
43+ Official @cap/* Native Packages
100% permissive licenses (MIT / Apache-2.0 / BSD / ISC / Zlib / CC0). Zero GPL contamination. Prebuilt & stripped.
Open-Source & Non-Profit · Sponsor CP
capdux.dev is the official open-source, non-profit technical portal for the CP Language — hosting public benchmarks, language documentation, and compiler releases under dual MIT OR Apache-2.0 licenses.
🌍 Community & Individual Backers
Help sustain CI/CD build runners, multi-arch prebuilt binaries, reproducible benchmark labs, and open documentation for developers worldwide.
🏢 Corporate & Ecosystem Partners
Support long-term compiler engineering, native @cap/* package maintenance, and security audits while featuring your engineering brand on capdux.dev.