How would one go about compiling a Parsetree directly? Currently I can parse my DSL to a Parsetree -> Pretty print it as ocaml -> compile the generated ocaml to get a native exec. This works but it feels clunky as surely the ocaml compiler can take a Parsetree and directly compile it.
Ast_mapper doesn’t seem to be the tool for compiling a DSL with ocaml. It makes perfect sense to me if you want to make an extension as you can map the Parsetree nodes you want to modify and make your changes but not for compiling a DSL generated Parsetree.