Fable.Compiler 5.0.0-alpha.11

This is a prerelease version of Fable.Compiler.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Fable.Compiler --version 5.0.0-alpha.11
                    
NuGet\Install-Package Fable.Compiler -Version 5.0.0-alpha.11
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fable.Compiler" Version="5.0.0-alpha.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fable.Compiler" Version="5.0.0-alpha.11" />
                    
Directory.Packages.props
<PackageReference Include="Fable.Compiler" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Fable.Compiler --version 5.0.0-alpha.11
                    
#r "nuget: Fable.Compiler, 5.0.0-alpha.11"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Fable.Compiler&version=5.0.0-alpha.11&prerelease
                    
Install Fable.Compiler as a Cake Addin
#tool nuget:?package=Fable.Compiler&version=5.0.0-alpha.11&prerelease
                    
Install Fable.Compiler as a Cake Tool

Fable: F# |> JS

Nuget Build Join the chat at https://gitter.im/fable-compiler/Fable

Follow us on Twitter!

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/fcs folder. 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.

  1. You need to have docker installed and running.
  2. Install the Dev Container extension in VSCode
  3. 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:

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 Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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-alpha.12 52 3/14/2025
5.0.0-alpha.11 167 3/3/2025
5.0.0-alpha.10 75 2/16/2025
5.0.0-alpha.9 341 1/28/2025
5.0.0-alpha.8 76 1/27/2025
5.0.0-alpha.7 82 1/23/2025
5.0.0-alpha.6 70 1/23/2025
5.0.0-alpha.5 57 1/9/2025
5.0.0-alpha.4 100 1/3/2025
5.0.0-alpha.3 75 12/18/2024
5.0.0-alpha.2 469 11/26/2024
5.0.0-alpha.1 78 11/24/2024
4.0.0-alpha-016 96 11/19/2024
4.0.0-alpha-015 159 10/28/2024
4.0.0-alpha-014 110 10/2/2024
4.0.0-alpha-013 112 9/19/2024
4.0.0-alpha-012 95 6/17/2024
4.0.0-alpha-011 293 6/13/2024
4.0.0-alpha-010 99 6/10/2024
4.0.0-alpha-009 127 5/24/2024
4.0.0-alpha-008 748 2/27/2024
4.0.0-alpha-007 181 2/20/2024
4.0.0-alpha-006 120 2/13/2024
4.0.0-alpha-005 218 2/12/2024
4.0.0-alpha-004 142 1/30/2024
4.0.0-alpha-003 99 1/30/2024
4.0.0-alpha-002 80 1/25/2024
4.0.0-alpha-001 143 12/14/2023
1.3.18 13,124 9/3/2018
1.3.17 8,683 5/10/2018
1.3.16 2,009 5/5/2018
1.3.15 9,004 4/19/2018
1.3.14 4,744 3/30/2018
1.3.12 2,067 3/22/2018
1.3.11 2,933 3/8/2018
1.3.10 3,517 3/1/2018
1.3.9 1,862 3/1/2018
1.3.8 6,702 1/23/2018
1.3.7 3,028 12/21/2017
1.3.6 2,305 12/14/2017
1.3.5 1,805 12/13/2017
1.3.4 2,438 11/29/2017
1.3.3 2,816 11/27/2017
1.3.2 2,690 11/23/2017
1.3.1 1,821 11/21/2017
1.3.0 1,883 11/15/2017
1.3.0-beta-009 1,089 11/15/2017
1.3.0-beta-008 1,054 11/14/2017
1.3.0-beta-007 1,093 11/10/2017
1.3.0-beta-006 1,123 10/27/2017
1.3.0-beta-003 1,166 10/26/2017
1.3.0-beta-002 1,223 10/19/2017
1.3.0-beta-001 1,301 9/29/2017
1.2.4 6,142 9/27/2017
1.2.3 2,517 9/18/2017
1.2.2 1,722 9/18/2017
1.2.1 3,153 9/10/2017
1.2.0 3,068 9/6/2017
1.2.0-beta-0015 1,455 8/31/2017
1.2.0-beta-0014 1,224 8/30/2017
1.2.0-beta-0012 1,179 8/28/2017
1.2.0-beta-001 1,476 8/23/2017
1.1.23 1,668 9/5/2017
1.1.22 1,796 8/22/2017
1.1.21 1,522 8/22/2017
1.1.20 2,071 8/8/2017
1.1.19 1,826 7/31/2017
1.1.18 1,675 7/27/2017
1.1.17 2,218 7/24/2017
1.1.16 1,649 7/22/2017
1.1.15 1,576 7/22/2017
1.1.14 1,682 7/18/2017
1.1.12 1,636 7/17/2017
1.1.11 1,964 7/13/2017
1.1.10 1,375 7/12/2017
1.1.9 1,776 7/11/2017
1.1.8 1,612 7/8/2017
1.1.7 1,886 7/5/2017
1.1.6 1,744 7/4/2017
1.1.5 1,559 6/28/2017
1.1.4 1,615 6/24/2017
1.1.3 1,713 6/20/2017
1.1.2 1,701 6/20/2017
1.1.1 1,694 6/19/2017
1.1.0 1,693 6/15/2017
1.1.0-rc-002 1,110 6/12/2017
1.1.0-rc-001 1,125 6/10/2017
1.0.14 1,646 6/14/2017
1.0.12 1,552 6/14/2017
1.0.11 1,620 6/13/2017
1.0.10 1,612 6/13/2017
1.0.9 1,581 6/13/2017
1.0.8 2,481 6/2/2017
1.0.7 1,789 5/27/2017
1.0.6 2,092 5/24/2017
1.0.5 1,572 5/24/2017
1.0.4 2,424 5/17/2017
1.0.3 1,541 5/17/2017
1.0.2 1,561 5/17/2017
1.0.1 1,597 5/17/2017
1.0.0-narumi-921 1,024 5/17/2017
1.0.0-narumi-920 1,132 5/16/2017
1.0.0-narumi-918 1,044 5/16/2017
1.0.0-narumi-917 1,215 5/16/2017
1.0.0-narumi-916 1,112 5/15/2017
1.0.0-narumi-915 1,293 5/9/2017
1.0.0-narumi-914 1,706 4/24/2017
1.0.0-narumi-912 1,188 4/23/2017
1.0.0-narumi-911 1,160 4/19/2017
1.0.0-narumi-910 1,122 4/19/2017
1.0.0-narumi-909 1,179 4/14/2017
1.0.0-narumi-908 1,463 4/2/2017
1.0.0-narumi-906 1,278 3/29/2017
1.0.0-narumi-905 1,095 3/27/2017
1.0.0-narumi-904 1,167 3/25/2017
1.0.0-narumi-903 1,186 3/23/2017
1.0.0-narumi-9 1,123 3/17/2017
1.0.0-narumi-8 1,165 3/15/2017
1.0.0-narumi-7 1,064 3/14/2017
1.0.0-narumi-6 1,120 3/14/2017
1.0.0-narumi-5 1,171 3/13/2017
1.0.0-narumi-4 1,042 3/13/2017
1.0.0-narumi-3 1,211 3/10/2017
1.0.0-narumi-2 1,033 3/10/2017
1.0.0-narumi-15 1,337 3/22/2017
1.0.0-narumi-10 1,222 3/20/2017
1.0.0-narumi-1 1,248 3/10/2017

## Added

- [JS/TS] Add support for `CaseRules.LowerAll` on `StringEnums` (by @shayanhabibi)
- [Rust] Support Rust 2024 language edition (by @ncave)
- [JS/TS] Add `C` and `c` format for numeric types (by @MangelMaxime)
- [JS/TS] Add `B` and `b` format for numeric types (by @MangelMaxime)
- [JS/TS] Add `n` format for numeric types (by @MangelMaxime)
- [JS/TS] Generate compiler error when detecting an invalid/unsupported format specifier for numeric types (by @MangelMaxime)

## Changed

- [JS/TS] Throw an error is an invalid Numeric format is provided (mimic .NET behavior) (by @MangelMaxime)

## Fixed

- [JS/TS] Fix #4025: No reflection info for pojos (by @alfonsogarciacaro)
- [JS/TS] Fix #4049: decimal/bigint to integer conversion checks (by @ncave)
- [JS/TS] Fix `decimal` to `char` conversion checks (by @ManngelMaxime)
- [JS/TS] Propagate non-captured exception when running `Async.Start` or `Async.StartImmediate` (by @MangelMaxime)
- [JS/TS] Report an error at compilation time when trying to use `Async.RunSynchronously` (by @MangelMaxime)
- [JS/TS] Fix short `DateTime` and `DateTimeOffset` short format strings (by @MangelMaxime)
- [All] Don't scan system packages for plugins (by @MangelMaxime)
- [JS/TS] Fix date formatting when repeating a format token more than the known format (example repeating 'd' more than 4 times) (by @MangelMaxime)
- [Python] Fix date formatting when repeating a format token more than the known format (example repeating 'd' more than 4 times) (by @MangelMaxime)
- [JS/TS] Fix #4010: Supports direct nested types when using `jsOptions` (by @MangelMaxime)
   ```fs
   let opts =
       jsOptions<Level1> (fun o ->
           o.level2.level3.valueA <- 10
           o.level2.level3.valueB <- 20
           o.topValueA <- 20
       )
   ```
- [JS/TS] Fix numeric formats (by @MangelMaxime)