BuckleScript

BuckleScript

  • Docs
  • Try
  • API
  • Community
  • Blog
  • Languages iconEnglish
    • 日本語
    • Español
    • Français
    • 한국어
    • Português (Brasil)
    • Русский
    • 中文
    • 繁體中文
    • Help Translate
  • GitHub
Hello! This particular page hash has moved to . Please update the URLs to reflect it. Thanks!
BuckleScript
Write safer and simpler code in OCaml & Reason, compile to JavaScript.
let result = Js.(
  [|1, 2, 3, 4|]
  |> Array.filter(x => x > 2)
  |> Array.mapi((x, i) => x + i)
  |> Array.reduce((x, y) => x + y, 0)
)
let result = Js.(
  [|1; 2; 3; 4|]
  |> Array.filter (fun x -> x > 2)
  |> Array.mapi (fun x i -> x + i)
  |> Array.reduce (fun x y -> x + y) 0
)
Get Started
Tutorial

Lean Developer Experience

Simple, small and blazing fast build workflow. No more configuration debugging!

The Whole JavaScript Ecosystem

Readable JS output + comprehensive support for communicating with existing code.

Solid, Stable & Cross-platform

BuckleScript is backed by OCaml. Decades of type system research and compiler engineering.

QuickStart

BuckleScript seamlessly integrates with Reason.
npm install -g bs-platform

# OCaml syntax
bsb -init my-new-project

# Reason syntax
bsb -init my-new-project -theme basic-reason

Examples

Hacker News

TodoMVC

Projects Using BuckleScript

See Full List