Browse thread
OCaml for Windows: a suggestion
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Lionel Fourquaux <lionel.fourquaux@w...> |
| Subject: | OCaml for Windows: a suggestion |
[French version at the end] Hello, I'd like to suggest a change in the way OCaml is built under Windows. Wouldn't it be better if the files from byterun/ that are shared by ocamlrun, the native code compiler and the otherlibs (i.e. the GC, the primitives, and support functions) were put in a DLL ? IMHO, it has a number of advantages, notably: o It's makes it simpler to implement dynamically imported primitives (because the support functions can be imported from this DLL). o It reduces the size of OCaml executables (because this part of the code is shared) So I suggest to split byterun/ into two directories: one for the base OCaml implementation, and another (very small) for ocamlrun, and to split ocamlrun into a DLL and a small executable. (This is about what is done for the Windows versions of Perl and Python.) What do other users think of this proposal? Lionel Fourquaux [Français] Bonjour, Je voudrais proposer une modification dans la manière dont OCaml est compilé sous Windows. Est-ce qu'il ne serait pas péférable de placer les fichiers utilisés à la fois par ocamlrun, asmrun et les otherlibs (c'est-à-dire le GC, les primitives, et des fonctions de `support') dans une DLL ? A mon avis, cela présenterait plusieurs avantages, dont en particulier : - de faciliter l'implémentation de bibliothèques dynamiques de primitives (puisqu'une telle DLL pourrait importer les fontions dont elle a besoin); - de rédure la taille des exécutable produits par OCaml (en partageant cette partie du code). Alors, je suggère de séparer byterun/ en deux répertoires : un pour l'implémentation des services de base d'OCaml, et un autre (très petit) pour ocamlrun, et de scinder ocamlrun en une DLL et un petit exécutable. (C'est à peu près ce qui est fait dans les versions Windows de Perl et de Python.) Qu'en pensent les autres utilisateurs ? Lionel Fourquaux