Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 537

Dune question: two executables sharing a module

$
0
0

I want to create two executable files that share a single module arith_inst. Here is what I tried to do in my dune file:

(executable
  (public_name arith)
  (name arith_interp)
  (modules arith arith_inst arith_interp)
  (modes byte)
  (libraries necromonads))

(executable
  (public_name arith_div)
  (name arith_div_interp)
  (modules arith_div arith_inst arith_div_interp)
  (modes byte)
  (libraries necromonads))

This fails because I am including the same module in two executable (which is exactly what I want to do). If I remove the modules stanza, I get an error about arith_interp being used in both executable (which is false, only the first one needs it).

What is the dune way to have a project with several executable files sharing some modules?

9 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 537

Trending Articles