(* Simplest example *) open Js_of_ocaml module C = Js_top_worker_client_msg module Msg = Js_top_worker_message.Message let log s = Console.console##log (Js.string s) let _ = let open Lwt.Infix in let t = C.create ~timeout:10000000 "_opam/worker.js" in let config : Msg.init_config = { findlib_requires = []; stdlib_dcs = None; findlib_index = None } in C.init t config >>= fun () -> C.errors t ~env_id:"default" "type xxx = int;;\n" >>= fun _o -> C.errors t ~env_id:"default" "type yyy = xxx;;\n" >>= fun _o2 -> Lwt.return ()