Rescript Compiler as OCaml Library

Hey everyone.

Wanted to know how can i install rescript-compiler as a library in my OCaml project? I found a rescript-syntax documentation which says it has some APIs to get the parsetree for a rescript file. But its been moved to rescript-compiler repository. So wanted to know how to use that?

Here’s the rescript-syntax repo. It has an example API usage in their readme - https://github.com/rescript-lang/syntax

Thanks!

Just vendor the parts you need.
as an example, have a look at the rescript-vscode repo: https://github.com/rescript-lang/rescript-vscode/tree/master/analysis/vendor

Note: The rescript-syntax is available as an opam library, but that version is old.