BuckleScript

BuckleScript

  • Docs
  • Try
  • API
  • Community
  • Blog
  • Languages iconEnglish
    • 日本語
    • Español
    • Français
    • 한국어
    • Português (Brasil)
    • Русский
    • 中文
    • 繁體中文
    • Help Translate
  • GitHub

›Standard Library

Intro

  • What & Why
  • Installation
  • New Project
  • Try
  • Concepts Overview
  • Upgrade Guide to v7

Interop

  • Overview
  • Cheatsheet
  • Embed Raw JavaScript
  • Common Data Types
  • Intro to External
  • Bind to Global Values
  • Null, Undefined & Option
  • Object
  • Object 2
  • Class
  • Function
  • Property access
  • Return value wrapping
  • Import & Export
  • Regular Expression
  • Exceptions
  • JSON
  • Pipe First
  • Generate Converters & Helpers
  • Better Data Structures Printing (Debug Mode)
  • NodeJS Special Variables
  • Miscellaneous
  • Browser Support & Polyfills

Build System

  • Overview
  • Configuration
  • Automatic Interface Generation
  • Interop with Other Build System
  • Performance
  • Advanced

Standard Library

  • Overview

Advanced

  • Conditional Compilation
  • Extended Compiler Options
  • Use Existing OCaml Libraries
  • Difference from Native OCaml
  • Compiler Architecture & Principles
  • Comparison to Js_of_ocaml
Edit

Overview

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

  • OCaml syntax standard library documentation.
  • Reason syntax standard library documentation.

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

In addition, we provide a few extra modules:

  • Belt: the BuckleScript standard library (beta). This standard library provides useful functions in addition to the OCaml standard library.
  • 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!
  • 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.

The full index of modules is available at: https://bucklescript.github.io/bucklescript/api/

Last updated on 4/13/2020
← AdvancedConditional Compilation →