Docs / BuckleScript / StdlibOverview

Stdlib Overview

BuckleScript is mostly just OCaml, so they share the same standard library:

Note that BuckleScript is currently at OCaml v4.06.1. We will upgrade newer OCaml versions later on.

In addition, we provide a few extra modules:

  • Js: all the familiar JS APIs and modules are here! E.g. if you want to use the JS Array API over the OCaml Array API because you're more familiar with the former, go ahead.

  • Belt: the BuckleScript standard library. This standard library provides useful functions in addition to the OCaml standard library and should be preferred when compiling to JavaScript.

  • Dom: contains DOM types. The DOM is very hard to bind to, so we've decided to only keep the types in the stdlib and let users bind to the subset of DOM they need downstream.

  • Node: for node-specific APIs. Experimental; contribution welcome!

The full index of modules is available at: