Using the NETMF as a hosted scripting engine

Hi to all.

This question is a little off beat from the usual topics but I have been looking into the NETMF codebase for a potential project idea and wanted to get some input from those who are a little more familiar with the codebase before I go any further.

To give a little context. I am looking a implementing a scripting engine for one of our projects and being familiar with C#, it would make a great language for my needs. But since the project will need to function cross platform, the regular .Net engine is a no-go. And even then, using something like Mono is likely out of the question due to the general footprint of a full blown .Net engine. So that brings me to the NETMF, which would be a good compromise in regards to footprint and features.

So this leads me to the first question. The NETMF being generally meant to be standalone at the hardware or on top of an existing OS, would it seem feasible to adapt the code base so that the framework would work as being hosted as part of another application?

If I understand correctly from looking at the documentation, the NETMF now supports Big-Endian platforms, right?

Also, since in my scenario, lots of the external functionality (file system, io, …) is not needed, does it seem possible to take a simplified solution and translate it into another build system such as Visual Studio? Some of the platforms I am targeting use a different build system and in some ways it might be easier to adapt the project to the build system and not the other way around, if not only to keep my build environment consistent for all sub-components of my project.

Any input or insight will be greatly appreciated,
Sebastien

In theory yes you can but you need to do some major changes on the core as it is not exactly meant to be a script engine.

Wow. That was quick :slight_smile:

In essence, I think it could do what I need it do do through interop. At least from my understanding of how the framework works. I am also debating using Mono but the footprint is a little scary. I think it more whether or not the NETMF could be condensed down and run in more of a hosted fashion.

Sebastien

I would only use NETMF for cross-platform if cross platform meant “directly on the metal”.

I once considered a project to port NETMF to x86 to run under a VM… Think about it… A super lightweight virtual appliance with no operating system - just the functional goodness of NETMF. Who needs an O/S anyway? I digress…

Why don’t you consider javascript as a cross-platform scripting platform. If there’s anything that runs on everything, that’s the one IMHO.

If you want to stick to C# as a language, consider that it just produces CIL that you can run on a CLR. These guys developed a tiny interpreter and CLR for the Lego Mindstorms processor - so it can certainly be done. Main link is broken - here is the cache page : [url]http://cc.bingj.com/cache.aspx?q=lego+mindstorms+.net&d=4666078534042817&mkt=en-ww&setlang=en-US&w=3efedab3,770faf59[/url]

My goal was to use it as a VM and not direct on the metal.

In theory, I could use Mono as a CLR implementation but besides the horrid build environment, the potential memory footprint is my main concern. Another concern comes from the fact that unless a JIT exists for the target platform, you need to implement your own versus an interpreted approach which will generally just need a PAL specific to the platform.

The Lego.NET page is interesting, I can just imagine the work needed to get a CIL compliant interpreter done. :slight_smile: