You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there everybody! It's been a while without Fable news but we're bringing you something today that we hope will get you excited. Today we're announcing the **alpha** release of Snake Island, codename for Fable 4. If you've been following us on Twitter you'll probably know this the most ambitious Fable release to date, extending the compilation targets for F# beyond JS, to include languages like Python, Rust or Dart. The ultimate goal is to convert F# into a super-powerful DSL you can use to design your programs and algorithms and still have the freedom to choose the platform you want to run your code on.
12
+
Hey there everybody! It's been a while without Fable news but we're bringing you something today that we hope will get you excited. Today we're announcing the **alpha** release of Snake Island, codename for Fable 4. If you've been following us on Twitter you probably know this is the most ambitious Fable release to date, extending the compilation targets for F# beyond JS, to include languages like Python, Rust or Dart. The ultimate goal is to convert F# into a super-powerful DSL you can use to design your programs and algorithms and still have the freedom to choose the platform you want to run your code on.
13
13
14
14
We also believe that, same as it happened with JS, the interaction with other ecosystems and communities is tremendously beneficial for the F# language and developers. Although it makes for a good catch-phrase, Fable wasn't born to make F# "the One to rule them all", instead we'll be most happy if Fable can be a bridge for F# developers to explore other worlds beyond .NET. Some of them have fully crossed the bridge and become Typescript/JS experts. This is great too and we hope it can also happen in the future for Python, Rust or Dart!
15
15
@@ -29,11 +29,11 @@ There are already a number of [libraries and projects](https://github.com/fable-
29
29
30
30
[ncave](https://github.com/ncave) is a long time contributor to F# and Fable community and is responsible for some of their most important achievements, like self-compiling the F# compiler to JS to power the F# and Fable [online](https://try.fsharp.org/)[REPLs](https://fable.io/repl/). Now, together with [Alex Swan](https://github.com/alexswan10k), ncave is working to compile F# to [Rust](https://www.rust-lang.org/) through Fable.
31
31
32
-
What are the benefits of compiling F# to Rust? Rust is a language with many features inspired from functional programming (expression-based, pattern matching) that focus on correctness and performance. It's a fantastic skill to have in your toolbox. But learning Rust is not always an easy task. Fable can be the bridge between the F# and Rust communities, allowing you to get introduced to Rust ecosystem while reusing your F# knowledge.
32
+
Rust is a language with many features inspired from functional programming (expression-based, pattern matching) that focus on correctness and performance. It's a fantastic skill to have in your toolbox. But learning Rust is not always an easy task. Fable can be the bridge between the F# and Rust communities, allowing you to get introduced to Rust ecosystem while reusing your F# knowledge.
33
33
34
-
Another interesting application is that Rust can be compiled to Web Assembly through [wasm-pack](https://rustwasm.github.io/wasm-pack/). This is already possible with F# and [Blazor](https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor), but as with native applications going through Rust you avoid having to include the whole .NET runtime in your apps. This makes Rust a better fit when you just want to compile a specific module (that you may have written already for Fable) to WASM for extra performance.
34
+
One of the benefits of compiling F# to Rust is to provide an alternative to .NET Native AOT compilation to native binaries, but with a smaller footprint. Another interesting application is that Rust can be compiled to WebAssembly through [wasm-pack](https://rustwasm.github.io/wasm-pack/). This is already possible with F# and [Blazor](https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor), but as with native applications going through Rust you avoid having to include the whole .NET runtime in your apps. This makes Rust a better fit when you just want to compile a specific module (that you may have written already for Fable) to WASM for extra performance.
35
35
36
-
A good example of this is [fable-raytracer](https://github.com/ncave/fable-raytracer) which takes code originally written for Fable and converts it to Rust to get nearly twice better performance than the JS version. You can try this example right now by cloning the repo and following the instructions in the [readme](https://github.com/ncave/fable-raytracer/#readme). And you can track the current progress for Rust compilation [here](https://github.com/fable-compiler/Fable/issues/2703).
36
+
A good example of this is [fable-raytracer](https://github.com/ncave/fable-raytracer) which takes code originally written for Fable and converts it to Rust to get nearly twice better performance using WebAssembly than the JS version. You can try this example right now by cloning the repo and following the instructions in the [readme](https://github.com/ncave/fable-raytracer/#readme). And you can track the current progress for Rust compilation [here](https://github.com/fable-compiler/Fable/issues/2703).
37
37
38
38
## Dart
39
39
@@ -121,7 +121,7 @@ export function Counter() {
121
121
}
122
122
```
123
123
124
-
Which in turn gets translated by Solid into imperative code that will update only the DOM parts depending on the values that have been updated, instead of running the whole render function. This way you can still write nice declarative code without worrying about memoized components or effects that run when they shouldn't. This is a similar idea to [Svelte](https://svelte.dev/), or what [FSharp.Adaptive](https://fsprojects.github.io/FSharp.Data.Adaptive/) and [Sutil](https://sutil.dev/) projects had already implemented for F#/Fable.
124
+
Which in turn gets translated by Solid.js into imperative code that will update only the DOM parts depending on the values that have been updated, instead of running the whole render function. This way you can still write nice declarative code without worrying about memoized components or effects that run when they shouldn't. This is a similar idea to [Svelte](https://svelte.dev/), or what [FSharp.Adaptive](https://fsprojects.github.io/FSharp.Data.Adaptive/) and [Sutil](https://sutil.dev/) projects had already implemented for F#/Fable.
125
125
126
126
Soon JSX will be available to Fable React apps too! Though as commented above, it won't make a big difference (and in fact it can be more limiting as JSX needs to be interpreted statically) but we are also introducing JSX templates which can be particularly helpful when bringing external HTML code to your app. And with the [F# template highlighting VS Code extension](https://marketplace.visualstudio.com/items?itemName=alfonsogarciacaro.vscode-template-fsharp-highlight) you can achieve a very similar experience to [Fable.Lit](https://fable.io/Fable.Lit/).
As mentioned above this a very ambitious project, and Fable is still an Open Source project maintained by contributors in their free time. We don't have strict roadmaps or deadlines, Snake Island has emerged because each of the contributors had a personal interest in using Fable to bring F# to an ecosystem they love (if you want Fable to target a new language, contribute!). We're still in the alpha release cycle and there are many challenges left until having a stable version. We can only overcome these challenges with the help of the community, you don't need to dive into the compiler code to fix bugs and add features, but it's very important for contributors to know their work is helping others, get feedback and receive words of encouragement (in Github or Twitter). Community contributions have been crucial for previous Fable releases, let's also bring this one to life together!
0 commit comments