BuckleScript

BuckleScript

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

›Recent Posts

Recent Posts

  • A story of exception encoding in BuckleScript
  • What's new in release 7.3
  • Generalized uncurry support in BuckleScript 7.3
  • Announcing bs-platform 7.2
  • Loading stdlib from memory

A Small Step for BuckleScript...

March 13, 2018

...and a big one for the community!

BuckleScript is a compiler, a set of type system enhancements, a build system and a great deal of JavaScript interoperability features rolled into one. From day one, its goal has been to provide a rock solid, lightweight and performant stack for the community. So far, we'd like to think that we've done a great job.

Alas, such a centralized effort can only scale so much. We'll continue to polish the foundation, tweak features and respond to demands, but BuckleScript's ready to tackle bigger challenges alongside our sister project, Reason. This is where you, the community, comes in.

This week, we're opening up a new suite of additions to the standard library, named Belt. Belt has been in closed beta for a while now; some of you might have heard of it or even used it. Now, the time's ripe to open it up to the broader public.

In the following weeks, we'll gradually outline the motivations, the design decisions and the future plans for Belt on this blog. However, new additions to the standard library aren't a small feat, and we can't possibly tackle all of them by ourselves. Your feedback as a community member will be very appreciated, and we will do our best to stay open to feedback, more so that we have ever done for the core compiler and build system. Belt's development will have more of an open process; we'll be monitoring the issue list closely for changes/features requests and tagging the them with Good First Task (contribution welcome). At the same time, we hope to clean up the repository's workflow a bit too, to ease future contributions.

Thank you for your continued support, and here's to a brighter future for BuckleScript and Reason! Stay tuned for the first of several posts on Belt. See you soon!

New Documentation Site!

December 1, 2017

Surprise! We've unified our documentation process with ReasonReact's. The docs revamp addresses one of the biggest demands for BuckleScript.

A few highlights:

  • The old doc site still exists at the same location, to preserve backward-compat for docs for a while.
  • Internationalization is now here and works the same way as ReasonReact's. Go wild.
  • The sections are now more cleanly organized.
  • More docs, simpler sections, more examples, fewer typos, nicer styling.
  • Reason code snippets alongside the OCaml snippets!

Enjoy and have a nice weekend!

BuckleScript 1.7.5

October 9, 2017

Since BuckleScript has grown and developed its own community, it is moving to its own GitHub organization. This will allow the community to continue to grow and to set the future direction of the project.

At the same time, we are truly thankful for the support of Bloomberg who allowed this amazing project to happen!

Read More

BuckleScript 1.7.4

October 8, 2017

Full changes: https://github.com/bucklescript/bucklescript/blob/master/Changes.md#bucklescript-174may-24-2017

Main highlights:

  1. Create a BuckleScript project and build in a single line(works on all platforms with zero dependencies including Windows)
npm install -g bs-platform && bsb -init hello && cd hello && npm run build

http://bucklescript.github.io/bucklescript/Manual.html#_using_existing_templates_since_1_7_4

  1. Adding several modules to Js namespace, including Option, Result, List and Vector. Note it is still work in progress, but these libraries are optimized for both performance and size, they can provide an even smaller code size than current case

BuckleScript 1.7.0

October 7, 2017

First class uncurried calling convention

As a functional language, the vanilla OCaml only provides curried calling convention, BuckleScript employs fairly advanced optimizations for curried calling convention, however, the most efficient code is efficient code not relying on optimizations.

Since this release, we provide first class uncurried calling convention, all toolchains provided by BuckleScript can understand uncurried calling convention

Read More

BuckleScript 1.5.2

October 6, 2017

Features

  1. FFI: Unicode literal support

  2. FFI: Return value checking

  3. FFI: Detect global variable existence

Minor breaking changes

  1. changes NodeJS special variables from module_ to _module to make it more consistent

  2. [%node ] return [_ option] type instead of undefined

BuckleScript 1.5.1

October 5, 2017

Features

  1. FFI: Unicode literal support

  2. FFI: return value checking

  3. FFI: Detect global variable existence

Minor breaking changes

  1. changes NodeJS special variables from module_ to _module to make it more consistent

  2. [%node ] return [_ option] type instead of undefined

BuckleScript 1.5.0

October 4, 2017

Besides a number of minor bug fixes and perf improvement, most notable changes

  • Bundled Reason together thanks to Reason team, so that Reason syntax support is also first class, this also makes Reason for the first time available to Windows users.
  • FFI added bs.uncurry which will automatically uncurry the callback so the user land API is clearer
  • Improve object label translation to cause less surprise, this might case minor backward compatibility

BuckleScript 1.4.3

October 3, 2017

Besides a number of minor bug fixes, most notable changes

  • ES6 module support, "es6", "es6-global" , "amdjs-global"

"es6" package-spec will generate es6 modules for each ocaml module, "es6-global" will also generate es6 modules but the path does not rely on node module resolution "amdjs-globa" is similar to "es6-global"

The es6 module is in perfect combination with rollup as a bundler, see this link about how good the dead code elimination is https://twitter.com/bobzhang1988/status/827562467148623875

BuckleScript 1.4.2

October 2, 2017

BuckleScript 1.4.2 release comes with quite a few enhancement.

Most notable features:

  1. The build system is ready to handle multiple npm packages, and its module system can be overriden by the end user. For example, if the library A(end user) depends library B and library C, we only need tell the build system that A needs goog module system, then B, C will be built using goog module system too.

There are quite lots of enhancements to the build system, we strongly recommend users to re-read the documentation http://bucklescript.github.io/bucklescript/Manual.html#_build_system_support

  1. FFI add a new feature

  2. FFI can handle bs.obj and bs.string combination

← PrevNext →