Is there a way to use rescript core library api?

I want to use rescript-compiler in node.js, are there some docs that describe how I can use rs-compiler as lib? For some examples,

const code = "let a: number = 1";
const comilerResult = rescript.comiler(code);

Then I can compiler codes are written in rs without rescript cli.

There’s no. It’s one of my project ideas, but probably I won’t have time for it in the next 6 months.
There are some projects you can use as a reference:


There’s also ( (ocaml & reasonml syntax supported) and ( To my knowledge the process to accompish this is quite involved and far more, than just importing a lib and call it’s API. But I never looked into it thoroughly.