(executable
 (name bench)
 (modules bench)
 (libraries http core core_unix.command_unix core_bench))

(executable
 (name lwt_unix_server)
 (modules lwt_unix_server)
 (libraries cohttp-lwt-unix logs.fmt fmt.tty))

(executable
 (name async_server)
 (modules async_server)
 (libraries cohttp-async core_unix.command_unix logs.fmt fmt.tty))

(executable
 (name eio_server)
 (modules eio_server)
 (libraries cohttp-eio eio_main))

(rule
 (alias bench)
 (package cohttp-bench)
 (enabled_if %{arch_sixtyfour})
 (action
  (run ./bench.exe time cycles)))

(rule
 (alias latency)
 (deps lwt_unix_server.exe async_server.exe)
 (package cohttp-bench)
 (action
  (run ./latency.sh)))

(executable
 (name lwt_unix_server_new)
 (modules lwt_unix_server_new)
 (libraries cohttp_server_lwt_unix lwt.unix lwt http unix))
