caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* OCaml for Windows: a suggestion
@ 2001-02-08 21:07 Lionel Fourquaux
  2001-02-04 17:54 ` Jean Martos
  0 siblings, 1 reply; 11+ messages in thread
From: Lionel Fourquaux @ 2001-02-08 21:07 UTC (permalink / raw)
  To: caml-list

[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





^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: OCaml for Windows: a suggestion
@ 2001-02-13  4:36 Hao-yang Wang
  2001-02-13 16:25 ` [Caml-list] " Brian Rogoff
  0 siblings, 1 reply; 11+ messages in thread
From: Hao-yang Wang @ 2001-02-13  4:36 UTC (permalink / raw)
  To: caml-list

>I did a Cygwin port of OCaml a few months ago.  It is available for
>testing from the CVS repository (http://camlcvs.inria.fr/), and will
>be available publically in the forthcoming 3.01 release.
>
>Everything works (including the debugger!) except the threads library,
>the COM interface via CamlIDL, and the toplevel GUI application.
>
>This port uses full Cygwin, not the Mingw subset.
>
>For the time being, the MSVC port is still maintained, but it is clear
>that we at INRIA don't have the resources to work on two Windows ports
>in parallel -- one port is already enough of a pain...  So, one of the
>ports will eventually have to go or be maintained by others.
>
>Enjoy,
>
>- Xavier Leroy


I don't mind whether the development environment of ocaml itself is built 
with MSVC or gcc. However, the interoperatibility (spelling?) between 
codes written in ocaml and MSVC is important to me.

Cheers,
Hao-yang Wang



^ permalink raw reply	[flat|nested] 11+ messages in thread
* [Caml-list] RE: OCaml for Windows: a suggestion
@ 2001-02-14 17:50 Dave Berry
  0 siblings, 0 replies; 11+ messages in thread
From: Dave Berry @ 2001-02-14 17:50 UTC (permalink / raw)
  To: Chris Hecker, Xavier Leroy; +Cc: caml-list

> -----Original Message-----
> From: Chris Hecker [mailto:checker@d6.com]

> A couple of suggestions were made for the Windows OCaml port. 
>  I disagree with both. 

> 1. making the port a gcc port rather than an msvc port

I agree that most production programmers use MSVC.  The question is whether
they/we need to compile the compiler, and whether they/we will be willing to
install GCC and Cygwin to build the system (as opposed to using it).  My
personal opinion is that I'd prefer MSVC, to avoid cluttering my machine
with other applications, but if this restricts the functionality of the
system, then I'd be willing to install Cygwin.  If I didn't already own a
copy of MSVC on my home machine, I might have a different opinion.

> 2. moving most of the runtime code into DLLs
> 
> This would be fine as an option, but there has to be a way to 
> make a standalone exe that only depends on default installed 
> Win32 dlls (user32.dll, kernel32.dll, advapi32.dll, 
> ws2_32.dll, etc.).  If I have to send a bunch of dlls along 
> with my exe for anybody to use my program then I'm _MUCH_ 
> less likely to use ocaml for anything real.  

My experience is that most production code builds an InstallShield or
similar installer, so users don't see all the files that are installed.
Even if you just use a zip file, all you need to do is to put the DLLs in
the same folder as the executable.

If the aim is to install a system-wide OCaml runtime DLL (and Cygwin, if
needed), then that is more complicated.  You can run into versioning
problems, if two applications are built to use different versions of the
runtime.  You also need a scheme for supplying the DLLs, and only installing
them if they aren't already installed.  Probably the simplest way to do this
is to provide boiler-plate installer code that people can adapt to build
their own installers.

> My suggestions are the following, 
> ...
> 3.  Generics. 

I believe OCaml supports functors, i.e. parameterised modules.  Did you have
something else in mind?

Dave. 
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-02-14 17:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-08 21:07 OCaml for Windows: a suggestion Lionel Fourquaux
2001-02-04 17:54 ` Jean Martos
2001-02-10 19:28   ` Lionel Fourquaux
2001-02-11  9:52   ` Xavier Leroy
2001-02-12 19:37     ` Chris Hecker
2001-02-12 21:27       ` Lionel Fourquaux
2001-02-14 15:32         ` [Caml-list] " Vijay Chakravarthy
2001-02-13 18:07           ` Mattias Waldau
2001-02-13 18:20           ` Gerd Stolpmann
2001-02-13  4:36 Hao-yang Wang
2001-02-13 16:25 ` [Caml-list] " Brian Rogoff
2001-02-14 17:50 [Caml-list] " Dave Berry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).