Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: ClearScript on Mono/Xamarin?

0
0
Hi Cadavre,

How does V8.NET do it, since their library works on other platforms? What are they doing different?

The difference has to do with the way these projects interface managed code with native code. Our understanding is that V8.NET uses P/Invoke with the managed and native sides residing in separate assemblies, whereas ClearScript uses mixed-mode assemblies that house both managed and native code.

Mono doesn't support mixed-mode assemblies on non-Windows platforms, and unfortunately this isn't just a matter of binary packaging. It affects how the marshaling code is written, and this is why creating a Mono-friendly version of ClearScript is not a trivial task.

Another issue for ClearScript is its reliance on the C# Runtime Binder, an API that Mono doesn't seem to support, although it does have other APIs that might provide a suitable alternative.

Cheers!

Viewing all articles
Browse latest Browse all 2297