[Mono-dev] small footprint mono / AOT
kumpera at gmail.com
Wed Aug 24 14:18:13 EDT 2011
On Wed, Aug 24, 2011 at 3:03 PM, Jonathan Shore <jonathan.shore at gmail.com>wrote:
> I have somewhat unusual requirements whereby need to have a minimal
> footprint, native, statically compiled app. (well yes they mostly intersect
> with embedded applications, but with some further requirements).
> This application will be distributed to thousands of linux and windows
> boxes to evaluate a computation. Due to bandwidth considerations and
> "no-touch" in terms of OS/library modifications, this deployment needs to
> - as small as possible
> - statically linked (well libmono.a kind of fits)
Keep in mind that the mono runtime in under the LGPL2 which demands that
relinking be possible. If you can't afford that you must negotiate
another license from Xamarin or Novell.
- no system / native dll dependencies (other than would be present on a
> vanilla windows XP or linux distro).
> - no installation of mono, gac requirement, etc.
> I've looked at: http://www.mono-project.com/Small_footprint. I have
> also looked at the default size of libmono.a (5.6M) and System.dll (1.6M).
> It would seem that I can reduce libmono to 1.7M with a recompilation with
> minimal features according to the document. Further questions:
> 1. is System.dll the same as mscorlib.dll (one being mono's and the
> other MS's)? Or are both of these needed?
> The only library strictly needed is mscorlib. System has other types.
> 1. is there a tool to build a special trimmed System.dll just to use
> the classes and descendents used by my application? (I just use basic types
> + System.Collections + System.IO)
Yes, you can use the mono linker for such thing.
> 1. are there any dependencies on shared libraries with a libmono.a
> linkage (on linux and windows)?
On linux libc, pthread, m. Optionally glib and icu.
No idea on windows, but should be analogous to linux.
> 1. are there any other files required besides System.dll (and my app
> dll), once libmono is linked to a host C-based application?
> mscorlib is always required
> 1. can an AOT+libmono embedded app run with no gac or specific
> dependencies, other than System.dll known to be in an arbitrary location?
Yes, this is how Xamarin's MonoTouch and Mono for Android products work.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list