For teaching purposes, I would like to use a pre-compiled library (without the .ml files) inside a project.
This corresponds precisely to the issues mentioned here support linking against cmo/cmi without source · Issue #1665 · ocaml/dune · GitHub
running OCAMLPATH=<path/to/my/lib> dune … does exactly what I want. However, I wonder if its possible to simply run my dune command without setting the OCAMLPATH variable manually.
The last comment in the issue seems to suggest something like that but I am not a dune wizard.