I'd like to be able to compile a C/C++ library so that it runs within a safe managed runtime in the Silverlight CLR.
There are several tools for doing this with the JVM that allows C++ code to run within a CRT emulation layer (see NestedVM, LLJVM, etc), which effectively allows C++ code to be run within a Java Applet. There's even a tool for this for the Adobe Flash VM (see Alchemy).
However, I can't seem to find any tools like this for the CLR. fyi, the MSVC tools don't seem to allow for this: The /clr:pure
flag will create C++ code that runs in the CLR, but it isn't safe (because the CRT isn't safe) and /clr:safe
requires massive code changes (no native types, etc).