Legend:
Library
Module
Module type
Parameter
Class
Class type
User-defined communication
since 0.1.0
User-defined communication
since 0.1.0
This module provides communication of arbitrary JSON data between the OCaml REPL and the Jupyter. See Comms (Jupyter Notebook Docs) for details.
Opening a comm from the REPL
OCaml:
let target = Target.create "comm-test" in
let comm = Comm.create target in (* Send comm_open to the frontend *)
Comm.send comm (`String "Hello") ; (* Send comm_msg to the frontend *)
Comm.close comm (* Send comm_close to the frontend *)