Fable.Compiler
5.24.0
See the version list below for details.
dotnet add package Fable.Compiler --version 5.24.0
NuGet\Install-Package Fable.Compiler -Version 5.24.0
<PackageReference Include="Fable.Compiler" Version="5.24.0" />
<PackageVersion Include="Fable.Compiler" Version="5.24.0" />
<PackageReference Include="Fable.Compiler" />
paket add Fable.Compiler --version 5.24.0
#r "nuget: Fable.Compiler, 5.24.0"
#:package Fable.Compiler@5.24.0
#addin nuget:?package=Fable.Compiler&version=5.24.0
#tool nuget:?package=Fable.Compiler&version=5.24.0
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.1.0)
- FSharp.SystemTextJson (>= 1.4.36)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Thoth.Json.Core.Auto (>= 0.2.0)
- Thoth.Json.System.Text.Json (>= 0.5.0)
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.25.0 | 38 | 10/29/2026 |
| 5.24.0 | 46 | 10/29/2026 |
| 5.23.0 | 98 | 10/22/2026 |
| 5.22.0 | 100 | 10/21/2026 |
| 5.21.0 | 129 | 10/16/2026 |
| 5.20.0 | 114 | 10/12/2026 |
| 5.19.1 | 95 | 10/12/2026 |
| 5.19.0 | 116 | 10/7/2026 |
| 5.18.0 | 117 | 10/3/2026 |
| 5.17.0 | 123 | 9/25/2026 |
| 5.16.2 | 168 | 9/12/2026 |
| 5.16.1 | 118 | 9/12/2026 |
| 5.16.0 | 149 | 9/8/2026 |
| 5.15.0 | 146 | 9/3/2026 |
| 5.14.1 | 178 | 8/25/2026 |
| 5.14.0 | 129 | 8/25/2026 |
| 5.13.0 | 473 | 7/24/2026 |
| 5.12.0 | 165 | 7/23/2026 |
| 5.11.0 | 157 | 7/17/2026 |
| 5.10.0 | 160 | 7/16/2026 |
### 🚀 Features
* *(all)* Error on unsupported RegexOptions at compile time (#5180) ([a8cbc5dc](https://github.com/fable-compiler/Fable/commit/a8cbc5dc0c3a96639028057e132b39e559f40ced))
* *(js/ts/python/dart)* Support Nullable conversions (#5183) ([6efa86d3](https://github.com/fable-compiler/Fable/commit/6efa86d35c5943dc8bbb6da0f27cc37095276064))
* *(js/ts/python/dart/beam)* Support System.Array.BinarySearch and ResizeArray.BinarySearch (#5172) ([d332e7d4](https://github.com/fable-compiler/Fable/commit/d332e7d42c889f172bb9501f505292abf519752f))
### 🐞 Bug Fixes
* *(all)* Warn on duplicate names in erased unions (#5169) ([459166d2](https://github.com/fable-compiler/Fable/commit/459166d2500a963a3616d8b1a63e1d8585d61ec6))
* *(all)* Recompile inline users of a file with a signature (#5179) ([b383673d](https://github.com/fable-compiler/Fable/commit/b383673da61cfe3ca06416a624aaafbd732f876c))
* *(all)* Accept RegexOptions.NonBacktracking (#5178) ([a61ec8a1](https://github.com/fable-compiler/Fable/commit/a61ec8a1583830599a7ffb2dfb4d093e99902d4f))
* *(all)* Keep F# diagnostics for scripts on Windows (#5218) ([ce886964](https://github.com/fable-compiler/Fable/commit/ce886964cb4521dc4c01c8da089b97c9d9742814))
* *(beam)* Raise ArgumentNullException from nullArg ([0b8f77f9](https://github.com/fable-compiler/Fable/commit/0b8f77f9880bcbd9317272d9b0d89f8fe8ac0257))
* *(beam)* Keep parameter name in ArgumentException ([9e5d34f7](https://github.com/fable-compiler/Fable/commit/9e5d34f7b32cfdfb8b1adc93378895b26a5d69b9))
* *(js/ts)* Format DateTimeOffset in its own offset (#5171) ([04ddbd20](https://github.com/fable-compiler/Fable/commit/04ddbd2027e03f4cf7b0b22fe886fdabadf26d93))
* *(js/ts)* Support %o in sprintf and interpolated strings (#5175) ([e13e7b0f](https://github.com/fable-compiler/Fable/commit/e13e7b0fdc16d26793833c77a11d242ccc61109b))
* *(js/ts)* Zero-fill Array.zeroCreate for numeric types without a typed array (#5211) ([d96b6ab8](https://github.com/fable-compiler/Fable/commit/d96b6ab82f0181be4a379c806abcedde23f1359a))
* *(js/ts)* Throw on out-of-range string indexer (#5214) ([d5f1f8fd](https://github.com/fable-compiler/Fable/commit/d5f1f8fdfab535eaff5c492661d0178be1c4c76a))
* *(js/ts)* Parse numbers like .NET and raise its exception types (#5200) ([82e606e9](https://github.com/fable-compiler/Fable/commit/82e606e9f8567d9bdad743df1b5de6abbdda89b0))
* *(js/ts)* Honor NumberStyles when parsing floats (#5217) ([82b935f3](https://github.com/fable-compiler/Fable/commit/82b935f3859b36923e5e0eb26771f860eadbe525))
* *(js/ts/dart)* Float to small integer and char conversions (#5182) ([bb0faa79](https://github.com/fable-compiler/Fable/commit/bb0faa794080a04e7791d419b2fa4d2ad107c186))
* *(js/ts/python)* Compare ReferenceEquality types by ref (#5174) ([9c351626](https://github.com/fable-compiler/Fable/commit/9c3516268674b54aec2efae381cad920d4f15922))
* *(js/ts/python/dart/beam)* Raise typed exceptions from invalidArg and invalidOp ([60f2f5b9](https://github.com/fable-compiler/Fable/commit/60f2f5b9fa0e6a26af0f3b4f3cddc2496f075ba3))
* *(js/ts/python/dart/beam)* Align collection exception types with FSharp.Core (#5153) ([7d7ceb33](https://github.com/fable-compiler/Fable/commit/7d7ceb33afd85a25bf06dc703e9d4a471cbc3292))
* *(js/ts/python/dart/beam)* Add FSharp.Core's argument checks to collection functions (#5154) ([5185e654](https://github.com/fable-compiler/Fable/commit/5185e6547416384fe85fcb0b0c1cf267708879db))
* *(python/beam/rust)* Implicit DateTime to DateTimeOffset (#5173) ([401c881f](https://github.com/fable-compiler/Fable/commit/401c881f729494d06d20da9687e78f7315f5efb2))
* *(ts)* Annotate Fable.Core typed arrays with native TS types ([e35d06c3](https://github.com/fable-compiler/Fable/commit/e35d06c36ba8ce4ab6cce75d6b332b9dcd50d711))
* *(ts)* Give Uint8ClampedArray its own Fable.Core type ([f790bf53](https://github.com/fable-compiler/Fable/commit/f790bf534fa6a242c1a302c76512e07054f4feb2))
### ⚡ Performance Improvements
* *(js/ts)* Standard library combine numeric hash from snapshot of object instead of mapping (#5151) ([44495104](https://github.com/fable-compiler/Fable/commit/44495104b5c7ac65bfcea184d1305fd29f1db9b4))
* *(js/ts)* Standard library remove .map result array from record hash using snapshot (#5150) ([0ceb5e9e](https://github.com/fable-compiler/Fable/commit/0ceb5e9ec5b470d00295a5cea9ead1c621c7858e))
* *(js/ts)* Standard library one pass List.append builder (#5148) ([2ed9d6dd](https://github.com/fable-compiler/Fable/commit/2ed9d6dd0a372e5bcf53dfe24d786bf9b9256fd3))
* *(js/ts)* Cast erased option unwraps in TypeScript output (#5181) ([65cd419d](https://github.com/fable-compiler/Fable/commit/65cd419d78e4dbc2008f8a707d5298e390defbee))
* *(js/ts)* List node as a class with a shared empty node (#5185) ([187f8985](https://github.com/fable-compiler/Fable/commit/187f89852413186b52d4ecdde55e1be7cf736785))
* *(js/ts)* Compile isNull to a plain null check (#5186) ([71a0ad92](https://github.com/fable-compiler/Fable/commit/71a0ad92237586e9569fd1483f35c88f8477f478))
* *(js/ts)* Check array bounds only on undefined reads (#5188) ([435fc0bb](https://github.com/fable-compiler/Fable/commit/435fc0bb008ff2ab7c14a08c7218be94f4735029))
* *(js/ts)* Closure-free ref cells and out-arg value cells (#5189) ([91bca925](https://github.com/fable-compiler/Fable/commit/91bca925757356191c7e6e7a71cb3e8a1bc8d52d))
* *(js/ts)* Keep the curried original on its adapter (#5191) ([bfb4a2a4](https://github.com/fable-compiler/Fable/commit/bfb4a2a4e3bb1b5bd4491955a1e1cb90c14050b6))
* *(js/ts)* Walk arrays by index when enumerated as seq (#5192) ([d88621c3](https://github.com/fable-compiler/Fable/commit/d88621c3b9d6ce48a72dc09b86a6805f612ac185))
* *(js/ts)* Throw invalidArg and invalidOp at the call site (#5194) ([e6a742b1](https://github.com/fable-compiler/Fable/commit/e6a742b1ebda71342d4445705ea9198c2059ae90))
* *(js/ts)* Hash unions without allocating (#5195) ([2b66a5d2](https://github.com/fable-compiler/Fable/commit/2b66a5d2184f3a35f0d73fb397ab902e300ac4bd))
* *(js/ts)* Probe dictionary buckets without allocating (#5196) ([9517eafd](https://github.com/fable-compiler/Fable/commit/9517eafd93aa7b84061662a421b7a39a7269318b))
* *(js/ts)* Pass array literals to typed array constructors as plain arrays (#5209) ([cb7d6d6e](https://github.com/fable-compiler/Fable/commit/cb7d6d6e49bb43b83afe80477ea2d6d667be3f5b))
<strong><small>[View changes on Github](https://github.com/fable-compiler/Fable/compare/2098f64a25e96385306ef19ed8c289f3b6c84db9..ce886964cb4521dc4c01c8da089b97c9d9742814)</small></strong>