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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tsirysndr/rescript-deno

v0.3.0

Published

Deno bindings for ReScript

Downloads

517

Readme

rescript-deno 🦕

Use Deno with ReScript.

Note: This is a work in progress. 🏗️🚧

Project Status: 🐲 Unstable, alpha-ish quality.

🚚 Install

You need to be on at least a recent RC of ReScript v11.

npm i @tsirysndr/rescript-deno @rescript/core

Include them in your rescript.json:

{
  "bs-dependencies": ["@rescript/core", "@tsirysndr/rescript-deno"]
}

rescript-deno is namespaced, so you'll find all modules listed under the main module TsirysndrRescriptDeno.

You're strongly encouraged to open TsirysndrRescriptDeno globally, to get the best possible developer experience. You do that by adding this to your rescript.json:

{
  "bsc-flags": [
    "-open TsirysndrRescriptDeno",
    "-open TsirysndrRescriptDeno.Globals",
    "-open RescriptCore"
  ]
}

This might be a matter of taste, but I recommend opening it to get the best experience.

This will make all of Deno available to you without needing to dip into the TsirysndrRescriptDeno module explicitly.

🧑‍🔬 Examples

A Simple HTTP Server:

Deno.serveWithOptions({port: 8007}, ~handler=req => {
  Response.new(String("Hello, world!"))
})->ignore

Make a request to a server:

let result = await fetch(String("https://rickandmortyapi.com/api/character"))
Console.log(await result->Response.json)

See playground directory in this repo for more examples.

📑 Current Coverage

There's still a good amount of bindings missing. Here's what's currently available:

  • [x] Broadcast Channel
    • [x] BroadcastChannel
  • [x] Cloud
    • [x] Deno KV
    • [x] Deno Cron
    • [x] Deno Queue
  • [ ] Cache API
    • [ ] Cache
    • [ ] CacheStorage
    • [ ] caches
  • [ ] Compression Streams API
    • [ ] CompressionStream
    • [ ] DecompressionStream
  • [ ] DOM APIs
  • [ ] DOM Events
  • [x] Encoding API
    • [x] TextDecoder
    • [x] TextEncoder
    • [x] atob
    • [x] btoa
  • [ ] Errors
  • [ ] ES Modules
  • [ ] Fetch API
    • [x] Body
    • [ ] EventSource
    • [x] FormData
    • [x] Headers
    • [x] Request
    • [x] Response
    • [x] ResponseInit
    • [x] BodyInit
    • [x] fetch
  • [x] File System
  • [ ] HTTP Server
    • [x] Deno.serve
    • [ ] Deno.serveHttp
  • [x] I/O
  • [x] Network
    • [x] Deno.connect
    • [x] Deno.connectTls
    • [x] Deno.listen
    • [x] Deno.listenTls
    • [x] Deno.networkInterfaces
    • [x] Deno.resolveDns
    • [x] Deno.shutdown
    • [x] Deno.startTls
  • [ ] Observability
  • [ ] Performance
  • [x] Permissions
  • [x] Runtime Environment
    • [x] Deno.version
    • [x] Deno.pid
    • [x] Deno.ppid
    • [x] Deno.noColor
    • [x] Deno.args
    • [x] Deno.mainModule
    • [x] Deno.build
    • [x] Deno.env
    • [x] Deno.exit
  • [ ] Scheduling
  • [ ] Streams API
  • [x] Sub Process
    • [x] Deno.ChildProcess
    • [x] Deno.Command
    • [x] Deno.kill
  • [x] Testing
    • [x] Deno.test
    • [x] Deno.bench
  • [ ] Timers
  • [ ] Typed Arrays
  • [ ] Web APIs
  • [ ] Web Crypto API
  • [ ] Web File API
    • [x] Blob
    • [x] File
    • [ ] FileReader
  • [x] Web Sockets
    • [x] CloseEvent
    • [x] WebSocket
  • [ ] Web Storage API
    • [ ] Storage
    • [ ] localStorage
    • [ ] sessionStorage
  • [ ] Web Workers
    • [ ] Worker
  • [ ] WebAssembly
  • [ ] WebGPU

🤝 Contributing

Contributions, issues and feature requests are welcome! See CONTRIBUTING.md for more info.