Configuration

rescript.json

Add @rescript-tauri/core to the dependencies key. ReScript 12 renamed the legacy bs-dependencies to dependencies; the bs--prefixed key is still accepted but deprecated.

{
  "name": "my-app",
  "dependencies": ["@rescript-tauri/core"],
  "package-specs": [{ "module": "esmodule", "in-source": true }],
  "suffix": ".res.mjs"
}

If you enable "namespace": true in your own package, @rescript-tauri/core modules remain accessible under the Tauri namespace top-level re-export (see docs/functional-design.md §2.8).

peerDependencies

@rescript-tauri/core declares the following peerDependencies so you can pin the upstream versions:

Peer

Range

@tauri-apps/api

^2.0.0

rescript

>=12.0.0

@rescript/core

>=1.6.0

@rescript/core 1.6.0+ has a peerDependencies.rescript of >=11.1.0, which fully covers ReScript 12.x.

Compatibility matrix

Component

Supported range

Tauri

2.x (matches the @tauri-apps/api peerDep range)

ReScript

>= 12.0.0 (uncurried-by-default)

@rescript/core

>= 1.6.0

Node.js

Active LTS

OS

Linux / macOS / Windows (Tauri 2.x desktop targets)

ReScript 11 is not supported. The decision and rationale are recorded in PRD §10 row 7 and the corresponding steering document.

Top-level Tauri re-export

Tauri.res re-exports a curated subset of modules so you can open Tauri and reach the most common entry points without long paths.

open Tauri
let result = await Core.Raw.invoke("greet", ~args={"name": "World"})

The re-export set (confirmed 2026-05-09 — PRD §10 row 1):

In Tauri

Reach via open Tauri

Core

Core.Raw.invoke, Core.Command.make, Core.Channel, Core.convertFileSrc

Event

Event.make, Event.listen, Event.once, Event.emit, Event.emitTo

Window

Window.t + ~80 instance / static methods

Webview

Webview.t + 14 instance methods + drag-drop variant

WebviewWindow

WebviewWindow.asWindow / asWebview casts + frequently-used methods

Not in Tauri (use explicitly)

Why

Path

Utility namespace; 31 helpers would shadow user names

App

Process metadata; explicit App.getName() is clearer

Dpi

Sized opaque types; explicit Dpi.LogicalSize.make reads better

Image

Opaque resource handle; explicit lifecycle

Menu / Tray

Heavy with sub-modules (Menu.MenuItem, Menu.Submenu, …)

Mocks

Test-only

Add-on packages

Add-on packages are each independently versioned and published. They declare both @rescript-tauri/core and the matching upstream library as peerDependencies.

Package

Upstream peer

Status

Guide

@rescript-tauri/plugin-fs

@tauri-apps/plugin-fs ^2.5.0

merged; plugin-fs-v0.1.0 npm publish pending

plugin-fs

@rescript-tauri/plugin-dialog

@tauri-apps/plugin-dialog ^2.7.0

merged; plugin-dialog-v0.1.0 npm publish pending

plugin-dialog

@rescript-tauri/schema

rescript-schema ^9.0.0

merged; schema-v0.1.0 npm publish pending

schema

rescript-struct is not supported (deprecated upstream; see RFC-0002 §2.1).