-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Labels
XL - Extra LargeSystem architecture overhaul, adding support for new platforms, large-scale dependency updates.System architecture overhaul, adding support for new platforms, large-scale dependency updates.
Description
Summary
Provide first-class JavaScript bindings for Tonbo via WebAssembly, supporting browser, Node.js, Deno, Bun, and Cloudflare Workers. Leverage fusio's executor abstraction to deliver native Promise integration across all runtimes, with platform-appropriate storage backends (OPFS, filesystem, R2/S3).
Current State
- WASM compilation works (
wasm32-unknown-unknowntarget) - Cloudflare Worker example exists
- No npm package
- No browser support (OPFS)
- No Node.js/Deno/Bun support
- No Arrow JS interop
- No TypeScript types
Why Multi-Runtime?
┌────────────────────────────────────────────────────────────┐
│ JavaScript Runtimes │
├─────────────┬─────────────┬─────────────┬──────────────────┤
│ Browser │ Node.js │ Deno │ Cloudflare/Edge │
├─────────────┼─────────────┼─────────────┼──────────────────┤
│ OPFS │ fs │ Deno.fs │ R2 / KV │
│ IndexedDB │ S3 SDK │ S3 SDK │ Durable Objects │
│ (fallback) │ │ │ │
└─────────────┴─────────────┴─────────────┴──────────────────┘
Each runtime has different:
- File system APIs
- Async primitives
- Module systems (ESM, CJS)
- Bundle constraints
Goals
- Single npm package:
npm install @tonbo/coreworks everywhere - Runtime detection: Auto-select appropriate storage/executor
- Arrow JS interop: Zero-copy where possible with
apache-arrow - TypeScript-first: Full type definitions
- Tree-shakeable: Minimal bundle for browser
- Promise-native: Idiomatic async/await
Non-Goals
- React/Vue/Svelte framework bindings (future)
- GraphQL/REST API layer (user responsibility)
- Offline-first sync engine (separate project)
- Legacy browser support (modern browsers only)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
XL - Extra LargeSystem architecture overhaul, adding support for new platforms, large-scale dependency updates.System architecture overhaul, adding support for new platforms, large-scale dependency updates.