JavaScript & TypeScript runtime
Secure by default.Every core, measured.
A JavaScript & TypeScript runtime written in Rust. Web standards first, Node compatibility optional.
cargo build --release -p velyr-cliProduces the velyr binary in target/release. Prebuilt binaries are on GitHub Releases; there is no install script yet.
Illustration: a token drops into the Velyr gate and is stopped with VELYR_PERMISSION_DENIED. After the grant --allow-read=./data, the token passes through the slot.
Default deny
Nothing is reachable until you say so.
A script starts with no filesystem, network, environment or process access. Each grant is a flag scoped to paths, hosts or names, and a denial names the kind of access, never the value that was asked for.
Read about permissionsTerminal session:
- Command: cat main.js
- Output: try {
- Output: console.log(await Velyr.readTextFile("./data/hello.txt"));
- Output: } catch (error) {
- Output: console.log(`${error.code}: ${error.message}`);
- Output: }
- Command: velyr run main.js
- Output: VELYR_PERMISSION_DENIED: fs-read access denied
- Command: velyr run --allow-read=./data main.js
- Output: hello from ./data
Principles
Five rules that do not move.
Secure by default
No filesystem, network, environment, process or FFI access without authority you grant.
Web standards first
Portable server APIs come before runtime-specific extensions.
Node compatibility is optional
Node compatibility is a product layer you add, not a property of the kernel.
Everything measurable
Performance, conformance, compatibility and security regressions have explicit gates.
Everything modular
Nothing is linked into a minimal build unless its profile or dependency graph needs it.
Status
What exists today, and what does not yet.
- Available
Deny-by-default permissions
No filesystem, network, environment or process access unless a flag or velyr.json grants it. Deny rules win over allow rules.
- Available
velyr run with ES modules
Run .js and .mjs entries as ES modules: static and dynamic import, top-level await, bare ESM packages from node_modules.
- Available
Web APIs
fetch, Streams with compression, Web Crypto, URL, TextEncoder, AbortController, MessageChannel, structuredClone and more.
- Available
Workers
Module workers whose permissions can only narrow the parent's, with structured clone, ports, quotas and termination.
- Available
Resource quotas
Limits on open files, sockets, listeners, workers, timers and body bytes, enforced per isolate.
- Available
Stable error codes
Failures carry a VELYR_ code and a message that never echoes the denied path, host or variable.
- Experimental
TypeScript
Type stripping through Oxc with source maps, no type checking. The crate exists; the CLI does not use it yet.
- Experimental
Native engine
An Oxc front-end, register bytecode and an in-house VM and collector. Opt in with --engine native in feature-gated builds; V8 is the default.
- Planned
Multicore serve
Velyr.serve and velyr serve --workers: one process that spreads isolates across cores.
- Planned
Node compatibility and WASM plugins
node: modules, Buffer and process as an opt-in layer; sandboxed WebAssembly plugins.
Measured, not claimed
Numbers when there are numbers.
Velyr is built to schedule isolates across every core of one machine. Benchmarks will be published with the harness, the hardware and the raw results, so anyone can rerun them. Until then, this page shows none.
How performance is measured