(rule
 (targets version.ml)
  (action
   (with-stdout-to %{targets}
    (echo "let version = \"%{version:a-dune-proj}\""))))
