(rule
 (targets config.h)
 (deps)
 (action
  (copy %{lib:jst-config:config.h} config.h)))

(library
 (foreign_stubs
  (language c)
  (names bigstring_stubs md5_stubs array_stubs gc_stubs time_ns_stubs
    timezone_js_loader_stubs)
  (flags :standard -D_LARGEFILE64_SOURCE))
 (name core)
 (public_name core)
 (install_c_headers time_ns_stubs)
 (libraries base base_bigstring base_for_tests base_quickcheck bin_prot
   command fieldslib filename_base heap_block ppx_diff.diffable
   jane-street-headers base.md5 ppx_assert.runtime-lib ppx_hash.runtime-lib
   ppx_inline_test.runtime-lib sexplib splittable_random stdio time_now
   typerep univ_map validate variantslib)
 (ocamlopt_flags
  :standard
  (:include ocamlopt-flags))
 (preprocess
  (pps ppx_jane ppx_optcomp ppx_diff.ppx_diff))
 (preprocessor_deps config.h gc_stubs.h)
 (js_of_ocaml
  (javascript_files strftime.js runtime.js
    temporal-polyfill/temporal-polyfill.js timezone_js_loader_stubs.js)))

(rule
 (targets gc_stubs.h)
 (deps)
 (action
  (bash "echo \"#define OCAML_5_MINUS false\" > %{targets}")))

(documentation)

(rule
 (targets ocamlopt-flags)
 (deps)
 (action
  (bash "echo '()' > ocamlopt-flags")))
