Open
Description
Expected Behavior
The documentation of the cytpes
feature mentions that there is support for deps, with the usual dependency specification language
https://dune.readthedocs.io/en/stable/foreign-code.html#ctypes-field-reference
Since the Dune’s ctypes feature is still experimental, it could be useful to add additional dependencies in order to make sure that local headers or libraries are available: (deps ). See Dependency Specification for more details.
So I expect to be able to write
(ctypes
(external_library_name somelib)
(build_flags_resolver pkg_config)
(deps
(:h "ocaml_bindings.h"))
(headers
(preamble "#include \"ocaml_bindings.h\""))
(type_description
(instance Type)
(functor Type_description))
(function_description
(concurrency sequential)
(instance Functions)
(functor Function_description))
(generated_types Types_generated)
(generated_entry_point C))
Actual Behavior
File "backend/cassandra_client/dune", line 14, characters 3-26:
14 | (:h "ocaml_bindings.h"))
^^^^^^^^^^^^^^^^^^^^^^^
Error: Unexpected list
Reproduction
- setup a basic project like indicated in https://dune.readthedocs.io/en/stable/foreign-code.html#a-toy-example
- create an
ocaml_bindings.h
file - add
(deps (:h "ocaml_bindings.h"))
dune build
Specifications
- Version of
dune
(output ofdune --version
): 3.16.0 - Version of
ocaml
(output ofocamlc --version
): 4.14 - Operating system (distribution and version): debian 12