(library
 (name bstr)
 (modules bstr)
 (public_name bstr)
 (foreign_stubs
  (language c)
  (names bstr)
  (flags
   (:standard -Wall -Wpointer-arith -Wsign-compare -Wshadow -Wcast-align)))
 (instrumentation
  (backend bisect_ppx))
 (wrapped false))

(library
 (name slice)
 (modules slice)
 (public_name slice)
 (instrumentation
  (backend bisect_ppx))
 (wrapped false))

(library
 (name slice_bytes)
 (modules bytes_labels slice_bytes)
 (public_name slice.bytes)
 (libraries slice)
 (wrapped false))

(library
 (name slice_bstr)
 (modules slice_bstr)
 (public_name slice.bstr)
 (libraries bstr slice)
 (wrapped false))

(rule
 (target slice_bytes.ml)
 (action
  (run
   ./../bin/generate.exe
   -m
   S
   -n
   Bytes_labels
   -i
   %{dep:slice.ml.in}
   -o
   %{target})))

(rule
 (target slice_bstr.ml)
 (action
  (run ./../bin/generate.exe -m S -n Bstr -i %{dep:slice.ml.in} -o %{target})))

(library
 (name bin)
 (modules
  bin
  bin_type
  bin_size
  bin_bstr
  bin_error
  bin_bytes
  bin_string
  bin_encoder_bstr
  bin_encoder_bytes
  bin_decoder_bstr
  bin_decoder_string)
 (public_name bin)
 (libraries bstr)
 (instrumentation
  (backend bisect_ppx))
 (wrapped false))

(rule
 (target bin_encoder_bstr.ml)
 (action
  (run
   ./../bin/generate.exe
   -m
   S
   -n
   Bin_bstr
   -i
   %{dep:bin_encoder.ml.in}
   -o
   %{target})))

(rule
 (target bin_decoder_unrolled.ml.in)
 (action
  (run
   ./../bin/branches.exe
   -int
   12
   -static
   4
   -i
   %{dep:bin_decoder.ml.in}
   -o
   %{target})))

(rule
 (target bin_decoder_bstr.ml)
 (action
  (run
   ./../bin/generate.exe
   -m
   S
   -n
   Bin_bstr
   -i
   %{dep:bin_decoder_unrolled.ml.in}
   -o
   %{target})))

(rule
 (target bin_encoder_bytes.ml)
 (action
  (run
   ./../bin/generate.exe
   -m
   S
   -n
   Bin_bytes
   -i
   %{dep:bin_encoder.ml.in}
   -o
   %{target})))

(rule
 (target bin_decoder_string.ml)
 (action
  (run
   ./../bin/generate.exe
   -m
   S
   -n
   Bin_string
   -i
   %{dep:bin_decoder_unrolled.ml.in}
   -o
   %{target})))
