"If you have to ask, you can't afford it." :)

The GHC API is not modular--if you use it, then the entirety of GHC is included into your program. That means that your executable will increase by the size of ghc.exe.

Furthermore, you will also need to ship several of the supporting executables, alongside the result. Basically, using the GHC API is going to add nearly the entire size of the full GHC distribution to your application.

On Windows, If you don't use via-C code generation, then you might be able to cut out some parts of the embedded GCC distribution (libraries, etc.)

I once looked at modularizing GHC so that parts like the bytecode interpreter, via-C compilation, template haskell, and compilation to/from external core could be removed to reduce the size of the program. However, it is non-trivial to do this, and I didn't want to maintain a branch of GHC with these parts factored out. it would be better to come up with a proposal that the GHC maintainers will accept for the mainline, and then implement it, if you want a modular GHC. I would like to do so but currently I am busy on other projects.

- Brian



On 2/10/07, Joel Reymont < joelr1@gmail.com> wrote:
Has anyone tried embedding ghc into their app?

How big are the resulting binaries?

        Thanks, Joel

--
http://wagerlabs.com/





_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe