npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rescript-tauri/plugin-dialog

v0.1.1

Published

ReScript bindings for @tauri-apps/plugin-dialog (Tauri 2.x native dialog plugin)

Readme

@rescript-tauri/plugin-dialog

ReScript bindings for @tauri-apps/plugin-dialog — Tauri 2.x's native dialog plugin (open / save / message / ask / confirm).

Status

Phase 2, first iteration. Awaiting first npm publish (plugin-dialog-v0.1.0).

Bundled in this iteration: 8 functions covering file pickers, save dialog, and message/ask/confirm prompts, plus their record-style options.

The TypeScript-level conditional return type of upstream's open is unrolled into four ReScript functions (openFile / openFiles / openDirectory / openDirectories) so result types stay static.

Already shipped alongside this binding:

  • Runnable example app: examples/plugin-dialog-demo (steering 036)
  • Dedicated CI workflows: tests-plugin-dialog-types.yml / tests-plugin-dialog-runtime.yml
    • a plugin-dialog-demo cell in the examples-build matrix (steering 041)
  • release.yml recognizes the plugin-dialog-v* tag prefix so a tag push routes to this package's npm publish (steering 041)

Deferred to follow-up sub-steerings:

  • MessageDialogButtonsYesNoCustom / custom-button label variants for message

Install (planned)

pnpm add @rescript-tauri/plugin-dialog @rescript-tauri/core @tauri-apps/plugin-dialog @tauri-apps/api

Add to rescript.json:

{
  "dependencies": ["@rescript/core", "@rescript-tauri/core", "@rescript-tauri/plugin-dialog"]
}

Quick example

module Dialog = RescriptTauriPluginDialog.PluginDialog

let pickReport = async () => {
  let pick = await Dialog.openFile(
    ~options={
      title: "Pick a report",
      filters: [{name: "CSV", extensions: ["csv"]}],
    },
  )

  switch pick->Nullable.toOption {
  | Some(path) => Console.log2("picked", path)
  | None => Console.log("user cancelled")
  }
}

let confirmDelete = async () => {
  let yes = await Dialog.confirm(
    "Delete this file? This cannot be undone.",
    ~options={kind: #warning, title: "Delete"},
  )
  if yes {
    Console.log("deleting...")
  }
}

Compatibility

| Component | Supported range | |---|---| | @rescript-tauri/plugin-dialog | this package | | @rescript-tauri/core | ^0.1.0 (peer) | | @tauri-apps/plugin-dialog | ^2.7.0 (peer) | | @tauri-apps/api | ^2.0.0 (transitive via core) | | Rust tauri-plugin-dialog | 2.x | | rescript | >=12.0.0 | | @rescript/core | >=1.6.0 | | OS | Linux / macOS / Windows |

Public API (this iteration)

| Symbol | Purpose | |---|---| | openFile / openFiles | Single / multi file selection | | openDirectory / openDirectories | Single / multi directory selection | | save | Save-as dialog | | message | Show a message dialog (returns the clicked button label) | | ask | Yes/No question (returns bool) | | confirm | OK/Cancel confirmation (returns bool) | | dialogFilter / openOptions / saveOptions / messageOptions / confirmOptions | Option records | | pickerMode / fileAccessMode / dialogKind / messageButtons | Polymorphic variants | | messageResult | string alias for the message return value |

See src/PluginDialog.resi for full documentation comments and matching upstream URLs.

See also