Is there an AI model that can convert JavaScript to ReScript?

My manager is familiar with JavaScript and he was inquiring if the AI models have matured enough to the point where it can emit ReScript code for the JavaScript code he is writing, and maybe generate the bindings as well. Or is that wishful thinking? Has anybody explored this area? Looking for some information here., if this is possible today.

1 Like

Make some experiments and you’ll see! I use copilot to generate my bindings and it’s correct 95% of the times. Don’t expect anything perfect but it can definitely help reduce the needed workload.

I’m curious to learn about your process there.
Do you use any specific prompt? Do you pass the llm.txt from the docs?

1 Like

Same, kindly elaborate on your process. Maybe this should be on a meetup streamed on YouTube.

2 Likes

what I do usually is that I start typing the first bindings in the style I like and then copilot autocomplete suggests me correct bindings, it’s not a silver bullet but it saves a lot of time and it’s quite flexible:


1 Like