I have a web server library which should embed a js_of_ocaml-generated
.js file. Embedding is done using ppx_blob. But I can’t find the way to:
- tell dune that this library depends on this generated
- refer to this file to pass it to ppx_blob.
dune file looks like
(library (name toto_server) (public_name toto_server) (wrapped true) (flags ...) (libraries ...) (modules ...) (preprocess (pps ... ppx_blob)) (preprocessor_deps (file toto_server_client_js) ) ) (executable (modes js) (name toto_server_client_js) (flags ...) (libraries ...) (modules toto_server_client_js) (preprocess (pps js_of_ocaml-ppx)) )
By now, dune complains about the
preprocess rule of the library with:
Error: No rule found for server/toto_server_client_js
And I guess that ppx_blob will not find the file if I simply put
let server_client_js = [%blob "toto_server_client.js"]
What’s the right way to achieve this ?