Can we rewrite the compiler by rescript itself?

I like rescript for it’s strong and sound type system, pipe operator, patten match, and i have a side project which contains 20k+ lines of rescript.
I just have a thought that may be we can write the rescript compiler by rescript itself, just like ts. If we do it in that way, the ide support and the language itself may envolve more faster!

I am not sure if that is currently possible.
Because under the hood ReScript Compiler uses OCaml and some libraries from OCaml ecosystem.
Also ReScript is a language which does not have its own run time. So if the compiler is written in ReScript then it should run on NodeJS which would be much slower than the native compiler.

4 Likes