Introduction

Stdlib

Stdlib is ReScript's built-in standard library. It contains just what you need for day-to-day programming in ReScript and covers most of the built-in JavaScript API along with extra functions that work well in ReScript. When possible it will compile directly to the equivalent JavaScript API, for example [1, 2, 3]->Array.map(a => a + 1) compiles to [1, 2, 3].map(a => a + 1).

Additional Libraries

ReScript ships with these two additional modules in its standard library:

  • WebAPI: Experimental, but we expect it to be stable very soon.

  • Belt: Immutable collections and extra helpers not available in JavaScript / Stdlib.

  • Dom: Deprecated DOM-related types and modules. You should use the WebAPI library instead.