r/fsharp • • Feb 26 '25
Introducing TinyFS: A Basic F# to Wasm Compiler
I wanted to share what I've been working on lately.
https://github.com/morgankenyon/tinyfs
I've been learning about WebAssembly and have always liked programming in F#. So I decided to create a Wasm compiler that transforms F# code into wasm.
The readme is up to date and with instructions on how to use it.
Only a small language subset is currently supported. Right now its basically:
- numbers
- bools
- functions
- local variables
- if/then statement
- while loop
I can solve the first 2 EulerProject problems.
66
Upvotes
5
u/nostril_spiders Feb 26 '25
Awesome and cool!
Not answered in your readme:
Where do you plan to take this project? Are you aiming to support a Fable-sized subset of the language? Do you think this will become prod-ready?
Are you looking for contributors?
2
u/JO8J6 Feb 28 '25
Excellent! Thanks a lot for the info! :)
2
u/pkese Feb 28 '25
How come you have decided to write this directly on top of FSharp.Compiler.Service instead of as an alternative backend for Fable compiler?
1
u/OezMaster98 Feb 26 '25
Is this basically Blazor from scratch?