interpreter
interpreter copied to clipboard
Quick and dirty experiments with Xamarin.iOS and the IL interpreter
interpreter
Quick and dirty experiments with Xamarin.iOS and the IL interpreter
-
dynamicload: a quick sample that does
Assembly.Load
,dynamic
, code downloading andSystem.Reflection.Emit
- all the things you can't normally do on iOS -
subclass: a specialized sample to validate special optimizations (mostly done by the managed linker) are not interfering, by default, with the interpreter.
Requirements
- Xamarin.iOS 12.7.1.x build
This is a special build that includes
- a
mscorlib.dll
with extra types, so compiling code usingSystem.Reflection.Emit
is possible; - a
libmono
runtime including theSystem.Reflection.Emit
native code (icalls) for devices; - a
System.Core.dll
build for the normal dynamic support (not the SLE interpreter);
The other (experimental) features are already included in Xamarin.iOS 12.6+
How-to roll your own interpreted application
- Create a new iOS project (or use an existing one);
- In the project's options, iOS Build, add
--interpreter
to the Additional mtouch arguments - Build and deploy to device
FAQ
- What happens if I don't provide the
--interpreter
argument ?
The application will be AOT'ed just like normal Xamarin.iOS applications always have been.
- What happens if I don't use Xamarin.iOS 12.7.1.x ?
Some extra features, like System.Reflection.Emit
, won't be supported.
- What happens if I use a newer Xamarin.iOS, like 12.8.x+ ?
Some extra features, like System.Reflection.Emit
, won't be supported. Xamarin.iOS 12.7.1 is a special build to preview features that will become available in a future stable release.
- How can I control what's AOT'ed and what's interpreted ?
--interpreter[=VALUE] Enable the *experimental* interpreter. Optionally
takes a comma-separated list of assemblies to
interpret (if prefixed with a minus sign, the
assembly will be AOT-compiled instead). 'all'
can be used to specify all assemblies. This
argument can be specified multiple times.
Feedback
If you are experimenting with this build then come talk to us on our gitter channel.
Please report issues on github issues and include all the requested information.