On Sun, Jan 10, 2010 at 11:15:08PM +1100, Majestic Perch wrote:
> The problem we have is that when running the testsuite there are
> many directories containing many individual .hs files that need to
> be built and linked against the GHC libraries.. Adding a copy to
> each directory isn't really an option.

This one's a corner case; you don't install the testsuite so there are
no problems with dynamic linking here. That should Just Work[tm],
although you may need to fiddle with the search path.

> Ok, so one of the use-cases we're interested in is writing multiple
> Windows plugins in Haskell and having them share copies of the
> Haskell runtime system and dynamic libraries. With static linking,
> the binaries are tens of megabytes. With DLLs, a "hello world"
> program is 10k bytes. If you load 5 statically linked plugins into
> the same executable you get 5 (almost) identical copies of the
> runtime system and base libraries...

> > The other approach is only available on XP and later: you create
> > something called a 'side-by-side assembly', which is basically a
> > library package for COM. I don't think you can do it with free tools -
> > it's normally done with Visual Studio. I'm also not sure how well it
> > works with thing like GHC which don't target COM or dotnet. They're
> > installed into \windows\winsxs\ and applications have to write an XML
> > manifest in order to access them. This is Microsoft's current vision
> > for the future (they're pushing it hard with dotnet, and use it for
> > their major redistributable library bundles), but it's likely to be
> > harder to make this work, and unclear whether there are any benefits.
> > 
> 
> Ok, this "side-by-side" assembly is good to know about it. Maybe
> that's what we want for the plugins.

If you can figure out a way to make it work with GHC libraries (and I
don't know whether this is easy or hard), it should do what you want
here. You'd create a single SxS assembly containing the entire set of
GHC dlls, which applications would reference as a unit. I'm not
intimately familiar with the SxS tools so I'm not sure exactly what it
would involve.

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to