Some highlights about ReScript compiler development

Dear ReScript contributors:

We made lots of quality of life improvements in the toolchain during the last few months, in particular, one thing we mainly focus on is to make the maintainance easier and more future proof.

One thing that makes ReScript hard to contribute is that we relies on a patched compiler, this is due to the fact that we needs conditional compilation to target three modes: DEBUG, RELEASE and BROWSER mode. The RELEASE mode is the most performant one, the BROWSER mode provides the playground support while the DEBUG mode makes debugging easier.

After some hard work in the last few months, we reach a milestone today, we are not relying on a patched compiler any more without losing any of those good stuff.

It is more than that, the ReScript toolchain works across 4.06~4.13 (4.04~4.06 should also work but not tested), I expect it should work out of the box with OCaml 5 too!

If you want to contribute to this project, you only need have a working OCaml compiler, that’s it. All the devtools would just work including the LSP server, ocamlformat. I invite you to give it a try and contributions are more than welcome.

Some personal updates

I am going to have a baby soon, I will still watch the forum but expect slow responses!

Best – Hongbo

38 Likes

This will help maintainability a lot, amazing progress! And more importantly congrats!! :baby:

PS: I can confirm that this will impact open source work :sweat_smile:, but totally worth it!

3 Likes

@Hongbo Congratulations for the baby!!! Thanks for your awesome work on compiler improvements. :+1:

1 Like

Wow congrats for the baby Hongbo! And amazing work on the compiler, this will simplify contributions so much!!

1 Like

Big congratulations for the baby! :smiley:

1 Like

Awesome. All the best for the baby!

1 Like

Awesome news on all fronts. Congratulations!

1 Like

Great news! Congratulations on your baby :heart:

1 Like

Happy for you and the young one :grinning_face_with_smiling_eyes: Hope you gonna have a little bit of sleep, even so, you may not :sweat_smile:

I hope that you can reintroduce the ocaml version used by the compiler in the version information.

bsc.exe -version   (from bucklescript)
>> BuckleScript 8.4.2 ( Using OCaml:4.06.1+BS )

bsc.exe -version   (from rescript)
>> ReScript 9.1.4

This is so much needed for integration: for ex, to read .cmt files.
This is ok as long as rescript is using a fixed version of ocaml, but it’ll be much more complex if you can change the ocaml version used at any release version.

and congratulations on the baby, great news !

1 Like

This sounds excellent! When can we start benefiting from the type-system upgrades since 4.06? :nerd_face:

And congrats on the baby :partying_face: :clap:

Congrats on the baby! :partying_face:

Congrats on the baby! :partying_face: :clap:

Good stuff! and congrats for the baby! :tada:

Since there will be a “rescript-compiler-libs” I don’t know if this makes sense anymore.

It makes sense for tools that are not built exclusively for rescript.

1 Like

Congrats for the baby! :tada: :tada: :tada:

Thank you for all of your hard work, and congrats!

Congrats! How did you get rid of the conditional compilation?

Congrats Hongbo, wish you the best!