Fable.Compiler
5.0.0-rc.12
dotnet add package Fable.Compiler --version 5.0.0-rc.12
NuGet\Install-Package Fable.Compiler -Version 5.0.0-rc.12
<PackageReference Include="Fable.Compiler" Version="5.0.0-rc.12" />
<PackageVersion Include="Fable.Compiler" Version="5.0.0-rc.12" />
<PackageReference Include="Fable.Compiler" />
paket add Fable.Compiler --version 5.0.0-rc.12
#r "nuget: Fable.Compiler, 5.0.0-rc.12"
#:package Fable.Compiler@5.0.0-rc.12
#addin nuget:?package=Fable.Compiler&version=5.0.0-rc.12&prerelease
#tool nuget:?package=Fable.Compiler&version=5.0.0-rc.12&prerelease
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. |
-
net10.0
- Fable.AST (>= 5.0.0-rc.3)
- FSharp.SystemTextJson (>= 1.4.36)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Fable.Compiler:
| Package | Downloads |
|---|---|
|
Fable.Plugins.NUnit
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.0-rc.12 | 31 | 3/31/2026 |
| 5.0.0-rc.11 | 40 | 3/20/2026 |
| 5.0.0-rc.10 | 48 | 3/10/2026 |
| 5.0.0-rc.2 | 49 | 3/3/2026 |
| 5.0.0-rc.1 | 54 | 2/26/2026 |
| 5.0.0-alpha.23 | 62 | 2/13/2026 |
| 5.0.0-alpha.22 | 58 | 2/3/2026 |
| 5.0.0-alpha.21 | 81 | 12/26/2025 |
| 5.0.0-alpha.20 | 216 | 12/15/2025 |
| 5.0.0-alpha.19 | 379 | 12/8/2025 |
| 5.0.0-alpha.18 | 180 | 12/4/2025 |
| 5.0.0-alpha.17 | 648 | 12/3/2025 |
| 5.0.0-alpha.16 | 154 | 11/27/2025 |
| 5.0.0-alpha.15 | 384 | 11/19/2025 |
| 5.0.0-alpha.14 | 385 | 7/25/2025 |
| 5.0.0-alpha.13 | 1,383 | 5/4/2025 |
| 4.0.0-alpha-019 | 201 | 11/25/2025 |
| 4.0.0-alpha-018 | 196 | 7/14/2025 |
| 4.0.0-alpha-017 | 207 | 4/26/2025 |
| 1.3.18 | 13,419 | 9/3/2018 |
### Fixed
* [Dart] Enable explicit variable typing for more data types (by @ncave)
* [Dart] Fix tests for `round`, `sign`, `truncate`, `log`, `log2`, `log10`, `pow`, `DivRem`, `Min`, `Max`, `Clamp`, `MinMagnitude`, `MaxMagnitude`, `cosh`, `sinh`, `tanh`, and float `Parse` (by @ncave)
* [Python] Add `Math.DivRem` support for int, int64, and bigint (by @dbrattli)
* [Python] Fix modulo with negative numbers using Python floored semantics instead of .NET truncated semantics for bigint (fixes #4462) (by @dbrattli)
* [Beam] Fix `System.String.Concat` with 4+ arguments not being supported (by @dbrattli)
* [TS/Python] Fix thisArg type for overloads in structs (#4453) (by @ncave)
* [TS/Python] Fix invalid `this` argument type in structs (#4453) (by @ncave)
* [JS/TS] Fix `N` format specifier (`ToString("N0")`, `String.Format("{0:N0}", ...)`) producing a trailing dot when precision is 0 (fix #2582) (by @MangelMaxime)
* [JS/TS] Fix `C0` and `P0` format specifiers producing trailing dot (e.g., `"¤1,000."` → `"¤1,000"`) (by @MangelMaxime)
* [All] Fix captured side-effect-free values (e.g. empty ResizeArray) being incorrectly inlined into object expression getters in release mode, causing a new instance to be created on each getter call (fixes #3779) (by @MangelMaxime)
* [Python] Fix missing `await` on else branch of ternary expressions in async closures (by @dbrattli)
* [Beam] Fix `|> ignore` on cross-module Emit calls generating variable bindings that shadow Emit case-clause variables (by @dbrattli)
* [Beam] Fix `containsIdentRef` not checking `Call` ThisArg (by @dbrattli)
* [JS/TS] `StringEnum` now respect `CompiledValue` and `CompiledName` (by @shayanhabibi)
* [JS/TS] Fix invalid syntax emitted when negating negative literals (fix #4251) (by @MangelMaxime)
* [Rust] Fix negative counting in CallInfo.GenericArgs (by @ncave)
* [Rust] Fix inline bindings and captured idents tracking (by @ncave)
* [Rust] Fix `return!` in async computation expressions so inner async workflows are returned and awaited correctly (by @mizzle-mo)
* [JS/TS] Improve `Regex.Escape` and `Regex.Unescape` handling (by @MangelMaxime)
* [All] Fix allow plugins to target .NET6 target framework (by @MangelMaxime)
* [Python] Fix function references passed as arguments inside tail-call optimised functions gaining unnecessary default parameters for outer TCO variables they don't reference (fix #3877)
* [TS] Fix abstract instance methods not emitted in TypeScript when class uses `[<AttachMembers>]` (fixes #3506) (by @MangelMaxime)
* [JS/TS] Fix `Unchecked.defaultof<'T>` for struct types with fields returning `undefined` instead of zero-initialized values (by @MangelMaxime)
* [JS/TS] Fixed quotation for union string cases (by @MangelMaxime)
* [Python] Fix `Unchecked.defaultof<'T>` for struct types with fields returning incorrect values instead of zero-initialized instances (by @MangelMaxime)
* [Python] Fix `Unchecked.defaultof<char>` returning `""` (empty string) instead of `"\u0000"` (null character) (by @MangelMaxime)
* [Python] Improve `Unchecked.defaultof<_>` for declared entities (by @MangelMaxime)