The compiler that emits JavaScript you can be proud of!

Functional-first programming

Fable brings together the power of the F# compiler and Babel to make JavaScript a true backend for F#. It works directly on F# source code, no compilation needed.

JavaScript you can be proud of

Fable optimizes F# code to generate as clean JavaScript as possible. It comes with a tiny core library (around 20KB minified and gzipped) and no other runtime.

Tools for the 21st century

Fable uses Babel to generate source maps. It is compatible with Babel plugins and JavaScript tools, like Webpack, and organizes code using ES6 modules.

Easy integration

Fable supports most of the F# core library and a bit of .NET BCL. It interacts seamlessly with other JavaScript libraries. As a bonus, it compiles NUnit tests to Mocha!

Getting started with Fable

Note that the documentation is still being updated.

To get started with Fable, we propose a template. Here are the instructions on how to use it.

Do you have 10 minutes? See Fable in action!

Watch a brief introduction to Fable by the author of Fable. Learn how to configure Fable, run the Fable samples including Mario game and client-server React.js demo compiled using WebPack.

Fable samples

Fable comes with a growing list of samples ranging from browser games to server-side node applications. You can find the full list at samples page and you can add your own samples by sending a pull request.

Fork me on GitHub