A complete map of the ReScript ecosystem across all stack layers.
This repository serves as an organizing framework for building full-stack applications entirely in ReScript, with smooth seams between layers and the ability to operate standalone or as swap-in components.
ReScript with authority for all layers—seams smoothed, sealed, and shining.
The goal is a coherent ecosystem where:
-
Every layer speaks ReScript (or has type-safe FFI)
-
Components work standalone OR as part of larger stacks
-
ABIs/FFIs are well-defined for interop with other ecosystems
-
Coverage gaps are visible and prioritized
┌─────────────────────────────────────────────────────────────────────────┐
│ PRESENTATION │
│ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ ┌─────────────┐ │
│ │ rescript-tea │ │ rescript-jsx │ │@rescript/react│ │rescript-tauri│ │
│ │ (TEA/Elm) │ │ (JSX) │ │ (React) │ │ (Mobile) │ │
│ └───────────────┘ └───────────────┘ └───────────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────────────────────────┤
│ ROUTING │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ cadre-tea-router │ │
│ │ URL parsing • Query params • Route guards • State sync │ │
│ └───────────────────────────────────────────────────────────────────┘ │
├─────────────────────────────────────────────────────────────────────────┤
│ STATE & DATA │
│ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ ┌─────────────┐ │
│ │ rescript-json │ │rescript-schema│ │ rescript-env │ │ indexeddb │ │
│ │ (Parsing) │ │ (Validation) │ │ (Config) │ │ (Browser) │ │
│ └───────────────┘ └───────────────┘ └───────────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────────────────────────┤
│ RUNTIME │
│ ┌─────────────────────────────┐ ┌─────────────────────────────────────┐│
│ │ rescript-wasm-runtime │ │ rescript-runtime-tools ││
│ │ Deno/Bun • SharedMem • DAG │ │ dev/build/test CLI • zero npm ││
│ └─────────────────────────────┘ └─────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────────────┤
│ COMPUTE (WASM) │
│ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ ┌─────────────┐ │
│ │ WASM Modules │ │ Shared Memory │ │ Dep Graph │ │ Codeprint │ │
│ │ (Rust→RS) │ │ (Zero-copy) │ │ (DAG) │ │ (Analysis) │ │
│ └───────────────┘ └───────────────┘ └───────────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────────────────────────┤
│ NETWORK/API │
│ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ ┌─────────────┐ │
│ │rescript-http │ │rescript-graphql│ │ rescript-ws │ │rescript-grpc│ │
│ │(Fetch/Server) │ │ (Client) │ │ (WebSocket) │ │ (Protobuf) │ │
│ └───────────────┘ └───────────────┘ └───────────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────────────────────────┤
│ PERSISTENCE/STORAGE │
│ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ ┌─────────────┐ │
│ │rescript-postgres│ │rescript-sqlite│ │ rescript-s3 │ │rescript-redis│ │
│ │ (SQL) │ │ (Embed) │ │ (Object) │ │ (Cache) │ │
│ └───────────────┘ └───────────────┘ └───────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘|
Note
|
Infrastructure bindings (Docker, Kubernetes, Terraform) are intentionally excluded. Use existing CLI tools via Deno.Command or TypeScript CDK libraries instead. See ROADMAP § WON’T for rationale.
|
| Component | Description | Status | Link |
|---|---|---|---|
rescript-tea |
TEA (Elm Architecture) for ReScript with layout engine and animation subscriptions |
✅ Active |
|
cadre-tea-router |
TEA-integrated routing with query parameters, state synchronisation, and route guards |
✅ Active |
|
rescript-wasm-runtime |
Deno/Bun runtime with SharedMemory zero-copy transfer and DAG dependency analysis |
✅ Active |
|
rescript-runtime-tools |
Runtime-aware build/dev tooling for Deno/Bun with zero npm (uses Deno npm: specifier) |
✅ Active |
|
rescribe-ssg |
Type-safe static site generator in ReScript with ML-family type inference and npm compatibility |
✅ Active |
|
rescript-postgres |
Type-safe PostgreSQL client with parameterised queries, connection pooling, and transaction support |
✅ Active |
|
rescript-http-server |
Type-safe HTTP server for Deno with routing, middleware, and response helpers |
✅ Active |
|
rescript-websocket |
Type-safe WebSocket client and server with Deno’s native WebSocket API |
✅ Active |
|
rescript-redis |
Type-safe Redis client with Streams, Sentinel, Cluster support plus strings, hashes, lists, sets, sorted sets, and pub/sub |
✅ Active |
|
rescript-env |
Type-safe environment variable access with runtime detection for Deno, Bun, and Node.js |
✅ Active |
|
rescript-poly-core |
Shared foundation library with Result, Async, Logger, Config utilities and MCP server infrastructure |
✅ Active |
|
create-rescript-poly |
CLI scaffolding tool for creating new ReScript projects with the Hyperpolymath stack |
✅ Active |
|
rescript-openapi |
Generate type-safe ReScript clients from OpenAPI specs (Rust CLI with rescript-schema integration) |
✅ Active |
|
rescript-grpc |
Complete gRPC stack: protobuf codegen, JSON/binary codecs, streaming RPC, server handlers, OneOf/well-known types |
✅ Active |
| Component | Description | Status | Link |
|---|---|---|---|
@rescript/react |
Official React bindings for ReScript |
✅ Stable |
|
@rescript/core |
Standard library for ReScript |
✅ Stable |
|
rescript-schema (Sury) |
Runtime type validation with excellent ergonomics. Recommended for all API boundaries. Now called "Sury" with Standard Schema support. |
✅ Stable |
|
rescript-webapi |
Browser Web API bindings. Includes Fetch API bindings. |
✅ Stable |
|
rescript-json-combinators |
JSON encoding and decoding with combinator pattern |
✅ Stable |
|
rescript-relay |
Relay GraphQL client bindings |
✅ Stable |
|
rescript-bun |
Bun runtime bindings |
🔵 Community |
| Component | Issue | Alternative |
|---|---|---|
rescript-nodejs |
Node.js lacks Deno’s security model, native TypeScript support, and modern module resolution. |
Migrate to Deno with rescript-wasm-runtime |
| Component | Requirement |
|---|---|
rescript-tauri |
Tauri 2.0 bindings for mobile and desktop applications |
ReScript compiles to JavaScript, so JS interop is native:
// Direct binding to any JS library
@module("some-js-lib") external doThing: string => unit = "doThing"For compute-heavy operations, use SharedArrayBuffer for zero-copy:
// See rescript-wasm-runtime/src/SharedMemory.res
let pool = SharedMemory.createPool()
let offset = SharedMemory.writeCommitHistory(pool, commits)
// Pass pool.buffer directly to WASM - no serializationFor systems programming, use wasm-bindgen or direct FFI:
// Rust side - compile to WASM
#[wasm_bindgen]
pub fn analyze_dependencies(buffer: &[u8]) -> JsValue { ... }Every component should follow these principles to work standalone OR integrated:
-
No Global State: Components receive dependencies via props/config
-
Type Boundaries: Export
.resiinterface files -
Minimal Dependencies: Each component should work with just
@rescript/core -
Config Over Convention: Accept configuration, don’t assume structure
-
Async-First: All I/O operations return promises
For a full-stack ReScript application:
# Frontend (TEA + Layout + Routing)
deno add npm:rescript npm:@rescript/react
deno add npm:rescript-tea npm:cadre-tea-router
# Runtime (Deno with JSR packages)
deno add jsr:@rescript/core
# Clone rescript-wasm-runtime for server components
git clone https://github.com/hyperpolymath/rescript-wasm-runtime
# Scaffold a new project (API, Web, MCP, or Library)
deno run -A jsr:@hyperpolymath/create-rescript-poly my-app --api --postgres --redisThis project recommends Deno as the primary runtime and package manager. While npm remains technically compatible, its use is strongly discouraged for the following reasons:
-
Security Model: npm’s permissive execution model permits arbitrary code execution during installation. Deno’s explicit permissions system (
--allow-read,--allow-net, etc.) provides defence in depth. -
Dependency Resolution: npm’s nested
node_modulesstructure creates significant disk overhead and introduces phantom dependency risks. Deno’s URL-based imports and global cache eliminate these concerns. -
Native TypeScript: Deno executes TypeScript directly without transpilation configuration, reducing toolchain complexity.
-
Standard Library: Deno’s standard library undergoes security review, whereas npm packages vary considerably in maintenance and security posture.
For legacy Node.js projects requiring npm compatibility, ensure thorough dependency auditing and consider migration to Deno at the earliest opportunity.
The poly-mcps repository provides Model Context Protocol servers that complement this stack. While not ReScript-specific, they provide LLM-accessible tooling for common infrastructure tasks.
| Server | Purpose | Replaces Need For |
|---|---|---|
poly-db-mcp |
Unified access to 20+ databases (PostgreSQL, Redis, MongoDB, etc.) |
Direct bindings for LLM workflows |
poly-secret-mcp |
Secrets management across providers |
rescript-env for LLM-driven config |
poly-queue-mcp |
Message queue operations |
Direct queue bindings |
poly-container-mcp |
Container runtime operations (Docker, Podman, nerdctl) |
rescript-docker (WON’T) |
poly-k8s-mcp |
Kubernetes cluster management |
rescript-k8s (WON’T) |
poly-cloud-mcp |
Multi-cloud provider management (AWS, GCP, Azure) |
Individual cloud bindings |
|
Note
|
MCP servers provide LLM tooling, not direct FFI bindings. For programmatic access in ReScript code, use the stack components above. For AI-assisted development workflows, use the MCP servers. |
-
rescript-runtime-tools - Runtime-aware dev tooling for Deno/Bun
-
poly-mcps - MCP servers for LLM integration
-
rescribe-ssg - Type-safe static site generator
-
git-dispatcher - Development philosophy docs
-
RSR - Repository standards
-
etma-handler - OU eTMA handler (Java 25 + Jakarta EE)
See ROADMAP.adoc for priorities and how to contribute.