What's Possible
Chuks is a general-purpose backend language with a rich standard library and a growing ecosystem of packages. Here’s what you can build today.
REST APIs & Web Services
Section titled “REST APIs & Web Services”Chuks has a built-in HTTP server that achieves 176K req/s — 2.1× faster than Go’s net/http. Combined with the standard library’s JSON, validation, JWT, and rate limiting modules, you can build production APIs with zero external dependencies.
import { createServer, Request, Response } from "std/http"import { jwt } from "std/jwt"import { validate } from "std/validate"
var app = createServer()
app.post("/users", function(req: Request, res: Response) { var body = req.body var token = jwt.sign({"userId": "123"}, "secret") res.json('{"token": "' + token + '"}')})
app.listen(8080)Key capabilities:
- GET, POST, PUT, DELETE, PATCH routing
- JSON request/response handling
- Middleware (auth, CORS, logging)
- JWT authentication
- Input validation
- Rate limiting
- Static file serving
Real-Time Services
Section titled “Real-Time Services”With the WebSocket package and built-in concurrency, Chuks is well-suited for real-time applications — chat servers, live dashboards, notification systems, and multiplayer game backends.
import { websocket } from "chuks_websocket"
// Broadcast messages to all connected clientsvar clients = []
function onMessage(ws:any, message:string) { for (var client of clients) { client.send(message) }}Use cases:
- Chat applications
- Live notifications
- Real-time dashboards
- Multiplayer game servers
- Collaborative editing backends
Microservices
Section titled “Microservices”Chuks compiles to a single native binary with no runtime dependencies. Combined with gRPC, message queues, and service discovery, you can build microservice architectures that deploy anywhere.
import { grpc } from "chuks_grpc"import { nats } from "chuks_nats"
// gRPC service + event-driven communicationAvailable integrations:
- gRPC — service-to-service RPC
- NATS — lightweight messaging
- Kafka — event streaming
- RabbitMQ — message queuing
- OpenAPI — API documentation generation
- OAuth — authentication flows
Database-Backed Applications
Section titled “Database-Backed Applications”Chuks has 4 SQL database drivers built-in (SQLite, PostgreSQL, MySQL, MSSQL) — no packages to install. Combined with the schema builder, repository pattern, and query builder, you get a full ORM experience out of the box.
import { db, DbDriver } from "std/db"
var conn = db.open(DbDriver.Postgres, "postgres://localhost:5432/mydb")
var users = db.query(conn, "SELECT * FROM users WHERE active = ?", [true])for (var i: int = 0; i < length(users); i++) { println(users[i]["name"] + ": " + users[i]["email"])}Built-in SQL drivers (no packages needed):
| Database | DbDriver Enum Values |
|---|---|
| SQLite | DbDriver.Sqlite, DbDriver.Sqlite3 |
| PostgreSQL | DbDriver.Postgres, DbDriver.PostgreSQL |
| MySQL / MariaDB | DbDriver.MySQL, DbDriver.MariaDB |
| Microsoft SQL Server | DbDriver.MSSQL, DbDriver.SQLServer |
Additional database packages:
| Database | Package |
|---|---|
| MongoDB | chuks_mongodb |
| Elasticsearch | chuks_elasticsearch |
| Redis | chuks_redis (caching & key-value) |
Built-in features:
- Query builder with fluent API
- Schema definitions with driver-specific DDL generation
- Repository pattern with CRUD, eager loading, and query chaining
- Cascade / foreign key constraints
- Extended column types (uuid, json, decimal, enum, datetime, bigInt)
- Connection pooling
Data Pipelines & ETL
Section titled “Data Pipelines & ETL”With CSV, XML, YAML parsing, S3 storage, and parallel computing via spawn, Chuks can process large datasets efficiently across multiple CPU cores.
import { csv } from "chuks_csv"import { s3 } from "chuks_s3"
// Read CSV, transform in parallel, upload to S3var records = csv.parse(data)var chunkSize = records.length / 4
var t1 = spawn processChunk(records, 0, chunkSize)var t2 = spawn processChunk(records, chunkSize, chunkSize * 2)var t3 = spawn processChunk(records, chunkSize * 2, chunkSize * 3)var t4 = spawn processChunk(records, chunkSize * 3, records.length)
var r1 = await t1var r2 = await t2var r3 = await t3var r4 = await t4Available packages:
- CSV — parse and generate CSV files
- XML — XML parsing and generation
- YAML — YAML parsing and generation
- S3 — AWS S3 object storage
- Elasticsearch — full-text search and analytics
Scheduled Jobs & Automation
Section titled “Scheduled Jobs & Automation”The cron package lets you build scheduled tasks, background workers, and automation scripts that run on a timer.
import { cron } from "chuks_cron"
// Run cleanup every hourcron.schedule("0 * * * *", function() { println("Running hourly cleanup...") cleanupExpiredSessions()})Use cases:
- Scheduled database cleanup
- Report generation
- Health checks & monitoring
- Data synchronization
- Automated backups
Email & Notifications
Section titled “Email & Notifications”Send transactional emails, alerts, and notifications with the SMTP package.
import { smtp } from "chuks_smtp"
smtp.send({ "to": "user@example.com", "subject": "Welcome!", "body": "Thanks for signing up.",})Observability & Monitoring
Section titled “Observability & Monitoring”The OpenTelemetry package provides distributed tracing, metrics, and logging for production systems.
import { otel } from "chuks_otel"
// Trace requests across servicesvar span = otel.startSpan("handleRequest")// ... process request ...span.end()CLI Tools & Scripts
Section titled “CLI Tools & Scripts”Chuks can be used as a scripting language (via chuks run) or compiled to a native binary (via chuks build). The standard library includes file system, OS, path, and regex modules for building command-line tools.
import { fs } from "std/fs"import { os } from "std/os"import { path } from "std/path"import { regex } from "std/regex"
var files = fs.readDir("./logs")for (var file of files) { if (regex.match(file, "\\.log$")) { var content = fs.readFile(path.join("./logs", file)) println("Processing: " + file) }}CPU-Intensive Computation
Section titled “CPU-Intensive Computation”Chuks AOT compiles to native code that matches Go’s performance. With spawn for parallelism, you can distribute CPU-bound work across all cores.
| Language | Parallel Time (5M primes) |
|---|---|
| Go | 39ms |
| Chuks (AOT) | 40ms |
| Java | 49ms |
| Bun | 51ms |
| Node.js | 71ms |
| Python | 2,661ms |
Use cases:
- Scientific computing
- Image/data processing
- Cryptographic operations
- Algorithm-heavy backends
Full Package Ecosystem
Section titled “Full Package Ecosystem”| Category | Packages |
|---|---|
| Databases | SQLite, PostgreSQL, MySQL, MSSQL (built-in); MongoDB, Elasticsearch, Redis (packages) |
| Messaging | Kafka, RabbitMQ, NATS |
| Protocols | gRPC, WebSocket, GraphQL |
| Cloud | S3, OAuth, OpenAPI |
| Data Formats | CSV, XML, YAML, JSON (stdlib) |
| Observability | OpenTelemetry |
| Infrastructure | Cron, SMTP |
| Security | JWT (stdlib), Crypto (stdlib), OAuth |
All packages are installed via chuks.json and resolved automatically at build time.
What You Get Out of the Box (No Packages Needed)
Section titled “What You Get Out of the Box (No Packages Needed)”The standard library alone covers:
- HTTP server with routing and middleware
- JSON parsing and serialization
- File system operations
- Cryptography (hashing, HMAC, encryption)
- JWT token signing and verification
- Input validation
- Rate limiting
- Date/time handling
- Regex pattern matching
- UUID generation
- Environment variables (dotenv)
- Base64 encoding/decoding
- Logging
- Testing framework
- TCP/UDP networking
- Database drivers (SQLite, PostgreSQL, MySQL, MSSQL), query builder, schema & repository
No npm install, no pip, no Maven — just write code and run it.