Fable 5.0.0-rc.4
See the version list below for details.
dotnet tool install --global Fable --version 5.0.0-rc.4
dotnet new tool-manifest
dotnet tool install --local Fable --version 5.0.0-rc.4
#tool dotnet:?package=Fable&version=5.0.0-rc.4&prerelease
nuke :add-package Fable --version 5.0.0-rc.4
Fable: F# |> JS
Fable is an F# to JavaScript compiler powered FSharp Compiler Services, designed to make F# a first-class citizen of the JavaScript ecosystem. Check the website for more information and if you find the project useful, don't forget to give us a star!
Fable actually uses a fork of FCS with a few tweaks. Binaries are in
lib/fcsfolder. See this PR for more info.
Getting started
Check this page.
Building
Requirements
Use VSCode Dev Container
You can use VSCode Dev Container to get a preconfigured environment both with requirements and VSCode extensions.
- You need to have docker installed and running.
- Install the Dev Container extension in VSCode
- Open the project in VSCode and click on the green button in the bottom left corner.
Use your machine
Make sure the following requirements are installed in your system:
- dotnet SDK 6 or higher
- node.js with npm
- Python 3 is installed and available as
python - Uv
- Rust
- Dart
- Erlang/OTP with rebar3 (for Beam/Erlang target)
Build
Run ./build.sh or ./build.cmd to see the build options.
When using VSCode, you can also run the build tasks from the command palette (Ctrl+Shift+P) by typing Run Task and selecting the task you want to run.
We also configured several debug configurations that you can use from the debug panel (Ctrl+Shift+D). This is useful as you can attach the debugger to the Fable compiler process to check what's going on.
Contributing
Just by using Fable you're already contributing! You can help the community a lot by sharing examples and experiences in your personal (or Fable's) blog and/or by editing the Fable Resources page.
Send bug reports (ideally with minimal code to reproduce the problem) and feature requests to this GitHub repository. To interact with the community you can use the Gitter chat but please note maintainers are not checking the chat regularly.
If you are up to contribute a fix or a feature yourself, you're more than welcome! Please send first an issue or a minimal Work In Progess PR so we can discuss the implementation details in advance.
List of changelogs
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.0-rc.5 | 155 | 3/20/2026 |
| 5.0.0-rc.4 | 59 | 3/19/2026 |
| 5.0.0-rc.3 | 317 | 3/10/2026 |
| 5.0.0-rc.2 | 246 | 3/3/2026 |
| 5.0.0-rc.1 | 212 | 2/26/2026 |
| 5.0.0-alpha.24 | 1,275 | 2/13/2026 |
| 5.0.0-alpha.23 | 448 | 2/3/2026 |
| 5.0.0-alpha.22 | 2,820 | 12/26/2025 |
| 5.0.0-alpha.21 | 2,288 | 12/15/2025 |
| 5.0.0-alpha.20 | 1,088 | 12/8/2025 |
| 5.0.0-alpha.19 | 600 | 12/4/2025 |
| 5.0.0-alpha.18 | 749 | 12/3/2025 |
| 5.0.0-alpha.17 | 794 | 11/27/2025 |
| 5.0.0-alpha.16 | 205 | 11/25/2025 |
| 5.0.0-alpha.15 | 1,274 | 11/19/2025 |
| 5.0.0-alpha.14 | 8,037 | 7/25/2025 |
| 4.29.0 | 3,255 | 2/13/2026 |
| 4.28.0 | 7,292 | 11/25/2025 |
| 4.27.0 | 6,508 | 11/13/2025 |
### Fixed
* [JS/TS] Fix `Array.zeroCreate` producing `null` for user-defined struct (value type) elements instead of a default-initialized instance (by @MangelMaxime)
* [All] Fix interpolated string holes missing format specifiers in State.fs and Python/Replacements.fs (code scanning alerts 1144, 1145, 1512)
* [Rust] Replace unsafe `.IsSome && .Value` option pattern with `Option.exists` in Fable2Rust.fs (code scanning alert 1125)
* [JS/TS] Fix `Unchecked.defaultof<char>` being emitted as `null` instead of `'\0'` (by @MangelMaxime)
* [JS/TS] Fix `static val mutable` fields declared with `[<DefaultValue>]` not being zero-initialized (fix #2739) (by @MangelMaxime)
* [JS/TS/Python] Fix record/struct types augmented with `static let` or `static member val` generating extra constructor parameters for each static field, causing constructor arguments to be assigned to wrong slots (by @MangelMaxime)
* [TS] Annotate `System.Collections.Generic.IList<T>` as `MutableArray<T>` (by @MangelMaxime)
* [JS/TS] Fix `ResizeArray` index getter/setter not throwing `IndexOutOfRangeException` when index is out of bounds (fix #3812) (by @MangelMaxime)
* [Beam] Fix unused term warning in try/catch when exception variable is not referenced (by @dbrattli)
* [Beam] Fix "no effect" warning for pure BIF calls (`self/0`, `node/0`) in non-final block positions (by @dbrattli)
* [Beam] Fix `reraise()` generating unbound `MatchValue` variable — use raw Erlang reason variable for re-throw (by @dbrattli)
* [Beam] Fix `Erlang.receive<'T>()` resolving to timeout overload due to F# unit argument (by @dbrattli)
* [JS/TS] Generate comments for members in class decorated with `[<AttachMembers>]` (by @MangelMaxime)
* [Beam] Fix `[<ImportAll>]` generating invalid `module:*()` Erlang code when binding is used as a value (by @dbrattli)
* [Beam] Fix string slicing and `Substring` with compound expressions producing wrong `binary:part` length due to missing parentheses in emitted Erlang (by @dbrattli)
* [Beam] Fix non-ASCII characters in string literals being truncated to single bytes — emit `<<"..."/utf8>>` instead of `<<"...">>` (by @dbrattli)
* [Beam] Fix `Emit` expressions with `case` leaking variables into surrounding scope — auto-wrap in IIFE for scope isolation (by @dbrattli)