; Library to support the different ways to "configure" semgrep.
; Not everything related to configuring semgrep is here (e.g., the rule format,
; most CLI flags), but in the long term we should try to put it here.
; This library should not depend on anything. It cannot depend on ../core.
(library
 (public_name semgrep.configuring)
 (name semgrep_configuring)
 (wrapped false)
 (libraries
   atdgen-runtime
   commons
   ppx_deriving_yojson
   process_limits
 )
 (preprocess
   (pps
     ppx_deriving.show
     ppx_deriving_yojson
     ppx_profiling
   )
 )
)

(rule
 (targets Rule_options_j.ml Rule_options_j.mli)
 (deps    Rule_options.atd)
 (action  (run atdgen -j -j-strict-fields -j-std %{deps})))

(rule
 (targets Rule_options_t.ml Rule_options_t.mli)
 (deps    Rule_options.atd)
 (action  (run atdgen -deriving-conv show -t %{deps})))
