(include_subdirs unqualified)

(alias
 (name default)
 (deps
  (source_tree www)))

(library
 (name workerServer)
 (modules WorkerServer)
 (instrumentation
  (backend bisect_ppx))
 (libraries
  str
  bonsai
  bonsai.web
  virtual_dom.input_widgets
  util
  ppx_yojson_conv.expander
  haz3lcore
  pretty
  omd)
 (js_of_ocaml)
 (preprocess
  (pps
   ppx_yojson_conv
   js_of_ocaml-ppx
   ppx_let
   ppx_sexp_conv
   ppx_deriving.show)))

(library
 (name haz3lweb)
 (instrumentation
  (backend bisect_ppx))
 (modules
  (:standard \ Main Gradescope)
  \
  Worker
  WorkerServer)
 (libraries
  ezjs_min
  ezjs_idb
  workerServer
  str
  bonsai
  bonsai.web
  virtual_dom.input_widgets
  util
  ppx_yojson_conv.expander
  haz3lcore
  pretty
  omd)
 (js_of_ocaml)
 (preprocess
  (pps
   js_of_ocaml-ppx
   ppx_let
   ppx_sexp_conv
   ppx_deriving.show
   ppx_yojson_conv
   bonsai.ppx_bonsai)))

(executable
 (name main)
 (modules Main)
 (libraries ppx_yojson_conv.expander haz3lweb)
 (modes js)
 (preprocess
  (pps
   ppx_yojson_conv
   js_of_ocaml-ppx
   ppx_let
   ppx_sexp_conv
   ppx_deriving.show
   bonsai.ppx_bonsai)))

(executable
 (name worker)
 (modules Worker)
 (libraries workerServer)
 (modes js)
 (preprocess
  (pps js_of_ocaml-ppx)))

(env
 (dev
  (js_of_ocaml
   (flags :standard --debuginfo --noinline --dynlink --linkall --sourcemap)))
 (release
  (js_of_ocaml
   (flags (:standard)))))
