Reference

Scope and design decisions

Understand what oruntime supports, what it delegates, and why.

Scope and design decisions

Goal

oruntime remains a lightweight primitive layer. It identifies the runtime, exposes common information, and helps code make portable decisions.

Supported

  • Ordered runtime detection and strict mode.
  • Reliable runtime versions when available.
  • Environment variables, user arguments, and current directory access.
  • Immutable capability detection.
  • Fetch with consistent timeouts and cancellation.
  • Abortable timers and promise deadlines.
  • Portable URL helpers.
  • A shared error model.

Outside the current scope

HTTP and WebSocket servers

Specialized server libraries already handle streams, upgrades, sockets, TLS, graceful shutdown, and performance. oruntime provides no server, router, or middleware.

File systems and paths

There are no oruntime/fs or oruntime/path modules. Node.js, Bun, and Deno already share many node: APIs, while browsers, virtual systems, and remote storage have different contracts.

Encoding and cryptography

These areas are not currently supported. Use native APIs or specialized libraries directly.

Storage

localStorage, IndexedDB, OPFS, KV, R2, Redis, and file systems do not provide the same guarantees, so storage does not belong in the current core.

Processes and operating systems

subprocess and signals can be detected, but oruntime does not re-export node:child_process, node:os, or process.

Principles

  1. Prefer existing standards.
  2. Detect real capabilities rather than relying only on the runtime name.
  3. Never hide permission failures as missing values.
  4. Avoid wrappers that merely rename an API.
  5. Compose with the ecosystem and let applications choose specialized libraries.

Criteria for new features

A proposed abstraction should solve a need across several target runtimes, normalize behavior without losing essential information, add value beyond a re-export, have a reasonable maintenance cost, remain tree-shakable, and not duplicate a stronger specialized library.