3 ms·
I'm curious how it integrates Mono runtime into a "native ARM executable". The whole runtime must be really big. When building the App, does it only integrates
by songgao 14y ago
I'm curious how it integrates Mono runtime into a "native ARM executable". The whole runtime must be really big. When building the App, does it only integrates the parts required to support the App, or does it integrate all?
The other question is that, when running on iOS, is it the .NET IL running on top of the runtime, or C# code is compiled into native binary code that can be directly executed on CPU? I'm trying to figure out if there's something like a micro VM running.
- keithwarren 14y agoShort answer: it gets converted to native, they can actually determine which parts of the .NET runtime you are using and only fold those elements in which makes the IPA pretty small actually. There is no virtual machine.
- songgao 14y agoThanks. That sounds pretty cool! Where does the conversion happen? Does it compile C# directly to target code, or it converts from .NET IL?
- migueldeicaza 14y agoC# is compiler to IL. The IL linker operates over the IL code (typically C# produced, but we are working now on adding also F#) and produces the minimal set needed to run. Then we compile the resulting linked IL to ARM code, and then we run the result using the C linker (so the same removal of unused code takes place, this time for the C bits of Mono).
- songgao 14y agoThat's neat. Just downloaded the installer and I'm gonna give it a try later today. Good job!
- migueldeicaza 14y agoWe wrote the equivalent of a linker, which only brings the pieces that you actually reference. http://docs.xamarin.com/guides/ios/advanced_topics/linker http://docs.xamarin.com/guides/ios/advanced_topics/linker
- shadowmint 14y agoDunno, but the android ones are pretty big. A simple 'hello world' view: ls -sl ~/Desktop/HelloWorld.apk 10144 -rw-r--r-- 1 doug core 5191787 20 Feb 23:46 /Users/doug/Desktop/HelloWorld.apk
- songgao 14y agoMost Apps are not as simple as a "hello world" view. My guess is that, the getting-started pack is large but when you add more things into it, it doesn't increase that much.