Skip to Content
API ReferenceOverview

API Reference

Every Tynd app has three surfaces:

  • Backend (@tynd/core) — imported by backend/main.ts, exposes app.start, emitters, lifecycle hooks.
  • Frontend RPC (@tynd/core/client) — typed proxy to your backend functions via createBackend<typeof backend>().
  • OS APIs (@tynd/core/client) — direct bridge from the frontend to the Rust host: dialog, window, clipboard, shell, notification, tray, process, fs, http, websocket, sql, sidecar, terminal, store, os, path, compute, and more.

Lite vs full parity. All OS APIs live in Rust (packages/host-rs/src/os/) so both runtimes expose the exact same surface. See Runtime Modes for JS-runtime differences.

Backend

  • @tynd/coreapp.start, app.onReady, app.onClose, createEmitter, AppConfig, WindowConfig, menu/tray config.
  • Streaming RPC — async-generator handlers.

OS APIs

Web-platform re-exports

@tynd/core/client also re-exports the standard Web globals as named exports so import * as tynd surfaces them in one namespace alongside the Tynd OS APIs:

import * as tynd from "@tynd/core/client"; await tynd.fetch(url); const ws = new tynd.WebSocket(wsUrl); const hash = await tynd.crypto.subtle.digest("SHA-256", bytes); await tynd.fs.readText(path); // Tynd OS API on the same namespace await tynd.sql.open(dbPath);

Available re-exports: fetch, Request, Response, Headers, AbortController, AbortSignal, ReadableStream, WebSocket, EventSource, crypto, URL, URLSearchParams, TextEncoder, TextDecoder, atob, btoa, Blob, File, FormData, structuredClone, performance.

Behavior matches the Web spec in both runtimes. In lite they point at Tynd’s polyfills; in full they point at Bun’s native implementations.

Last updated on