I don't understand the problem with the current semantics. The .cmxs will be linked when both predicates "archive" and "plugin" are true, and that seems correct to me (we use this when we want to link a *plugin* inside a *native* program). This is consistent with the use for example of (syntax,preprocessor,camlp4o) and (syntax,preprocessor,camlp4r) to select standard or revised syntax, or (syntax,toploop) when invoked from the toplevel. Also many packages currently use archive(byte,plugin) as well (which links to the .cma, just as with only archive(byte)).

On Thu, Apr 9, 2015 at 1:47 PM, François Bobot <francois.bobot@cea.fr> wrote:
Hi,

        Another topic which need a standard is native dynamic plugins. In fact there is a defacto standard (used by some libraries and tools, but not specified in ocamlfind documentation) but it is a bad one.

  archive(plugin,native) = "toto.cmxs"

It is a bad one because the semantic of META file says that the value of `archive(native)` can be return when you ask the value of `archive` with the predicate `plugin` and the predicate `native` true.

I discussed it with some people and the current proposition where

  * archive(plugin_native)
  * archive(plugin)
  * archive(shared)


I personally prefer the `shared` predicate because it corresponds to the `-shared` option of ocamlopt that creates `.cmxs`.

 The predicate `shared` would be added to ocamlfind documentation. The prospective `ocamlfind check META` could recommend to add an `archive(shared)` if the `archive(native)` exists. For a transition period `archive(plugin,native)` and `archive(shared)` would be both present in the META.


Thoughts or suggestions?


Best regards,

--
François Bobot

--
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs