Your TypeScript, compiled to a native executable. Rust-class speed, every core, no runtime.
HEALTH ? 89 / Healthy
Your TypeScript, compiled to a native executable. Rust-class speed, every core, no runtime.
// readme
Your TypeScript, compiled to a native executable. Rust-class speed, every core, no runtime.
Install Β· VS Code extension (with F5 debugging) Β· Getting started Β· Tour Β· Docs
Velt compiles TypeScript ahead of time to machine code through LLVM. It is not a JavaScript engine and doesnβt wrap one: there is no interpreter, no JIT warm-up, no garbage collector and no single-threaded event loop. Your program is a native binary that uses every core of the machine.
// src/main.vlt of a package made with `velt new hello --template api`
// (its package.vlt depends on the http-server package): `velt run`
import { serve } from "http-server";
interface User {
id: string;
name: string;
}
const users = new Map<string, User>();
users.set("42", { id: "42", name: "Ada" });
await serve({ port: 8080 }, async (req: Request): Promise<Response> => {
const id = new URL(req.url).searchParams.get("id") ?? "";
const user = users.get(id);
ifβ¦