Skip to content
SPECIFICTION
Get listed

Fable vs js_of_ocaml

Fable

fable.io

js_of_ocaml

ocsigen.org

Side by side

FigureFablejs_of_ocaml
Price from—Free
Free plan—Yes
Free trial——
Open source——
WebYesYes
Linux—Yes
API—Yes
Plans published01
Spec score · Code Transpilers7.3 (#22)8.4 (#5)
JavaScript interopFable supports importing JavaScript modules and using NPM packages from F# code.Its library provides a typed interface for bridging differences between OCaml and JavaScript values.
LibrariesThe documentation lists Fable.Core, Fable.Browser.Dom, Fable.Elmish.React, and Thoth.Json as libraries available for Fable projects, and cautions that not all NuGet libraries work with Fable.The distribution includes packages for Lwt support, TyXML, JSON derivation, and running an OCaml toplevel in the browser.
LicenseThe Fable repository identifies its license as MIT.The repository lists GPL-2.0-or-later and LGPL-2.1-or-later with the OCaml linking exception as its licenses.
SupportThe project repository accepts bug reports and feature requests, and notes that maintainers do not check its Gitter chat regularly.The project asks users to report problems or questions through GitHub issues and include version details and a minimal reproducible example when possible.

Plans

Fable

No plans published.

Fable pricing →

js_of_ocaml

  • js_of_ocamlFree

js_of_ocaml pricing →

In their own words

Fable

Fable has no write-up on Specifiction yet; its figures are above.

Visit fable.io

js_of_ocaml

js_of_ocaml compiles OCaml bytecode programs into JavaScript for browsers and Node.js. It works with an existing OCaml installation and does not require libraries to be recompiled. Installation is available through opam, while Dune supports separate compilation in development and whole-program compilation in release builds. Whole-program compilation performs global dead-code elimination and cross-module optimization. The library provides a typed bridge between OCaml and JavaScript, including PPX syntax for properties, methods, constructors and objects. Browser bindings cover the DOM, Fetch, WebSockets, WebGL, workers and typed arrays. Optional packages add Lwt support, TyXML, JSON derivation and an OCaml toplevel in the browser. Documented targets include Node.js 18 or later, QuickJS-NG and modern ECMAScript 2020 browsers, including Chrome 80+, Firefox 74+, Safari 13.4+ and Edge 80+. Requirements include OCaml 4.13–5.5, Dune 3.20 or later and Menhir. The project is free and open source.

Visit ocsigen.org