Compiling to assembly script


#1

As silly as it may sound, I was thinking about how hard it would be to make bucklescript produce assembly script? In other words, support typescript in addition to es6 and commonjs.

I thought this could be useful is for getting ocaml running on web assembly without waiting for the more direct approach to be ready, which I estimate is 1 or 2 years away.

I’d also be curious to know from the community if there’s any other particular good reasons to add type script as a compilation target, or whether it was ever discussed before.

Thanks!


#2

regardings compiling to typescript and then wasm: that’s a lot indirections, lots of things could go wrong in the process. So IMHO, this isn’t worth it given bucklescript is a small team.
But anyway, you might be interested in gentype https://github.com/cristianoc/genType