(executable
 (public_name permap)
 (modules permap)
 (package permap)
 (libraries
  config_serv_impl ; implements config_serv
  config_impl ; implements config
  shared
  permap
  ;;
  dream
  fmt
  fpath
  uri
  prelude)
 (preprocess
  (pps lwt_ppx))
 (flags
  (:standard -open Prelude)))

(library
 (name permap)
 (wrapped false)
 (modules :standard \ permap json_data syntax types err validate_str)
 (libraries
  config_serv ; virtual
  config ; virtual
  shared ; virtual
  comment
  ;;
  bos
  caqti
  caqti.blocking
  caqti-driver-sqlite3
  conan
  conan.string
  conan-database.light
  digestif
  dream
  dream-pure
  emile
  fmt
  htmlit
  safepass
  uuidm
  unix
  prelude)
 (preprocess
  (pps lwt_ppx))
 (flags
  (:standard -open Prelude)))

(library
 (name shared)
 (wrapped false)
 (modules json_data syntax types err validate_str)
 (modules_without_implementation types)
 (libraries
  config ; virtual
  comment
  ;;
  lwt
  data-encoding
  fmt
  prelude)
 (flags
  (:standard -open Prelude)))

(rule
 (target assets.ml)
 (deps
  (source_tree assets)
  (file assets/js/client.js))
 (action
  (with-stdout-to
   %{null}
   (run ocaml-crunch -m plain assets -o %{target}))))
