youalibala / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

Is 1.1 source code compatible with .NET Micro Framework? #357

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It could be really useful in many scenarios.

Thanks.

Original issue reported on code.google.com by maio...@gmail.com on 25 Feb 2013 at 11:24

GoogleCodeExporter commented 8 years ago
Interesting subject. As part of re-writing the core for v2, I intentionally 
designed it to be *in theory* usable without generics. I've tried it with FX 
1.1 and (last time I did this) it was fine. I haven't tried it with Micro 
Framework - it hasn't been requested, so I've been focusing elsewhere. However, 
it it not unreasonable that it should work. What version of MF would you have 
in mind? .NET MF 4.2 RTM (QFE1) ? or something older? and what sort of size 
library is acceptable? I would also *assume* that MF would want to be a "Core 
Only" build, using "precompile" to do all the leg-work.

Original comment by marc.gravell on 25 Feb 2013 at 12:09

GoogleCodeExporter commented 8 years ago
Recently .NETMF team released 4.3 version, but since 4.0 very few aspects 
concerning language/compiler/IL and similar stuff has changed.

Curiously, I was taking a look at your source code and discovered that it 
already contains code blocks targeted to .NET MF!

For example in Helpers.cs:

 [System.Diagnostics.Conditional("DEBUG")]
        public static void DebugWriteLine(string message)
        {
#if MF      
            Microsoft.SPOT.Debug.Print(message);
#else
            System.Diagnostics.Debug.WriteLine(message);
#endif
        }

Similarly in ProtoReader and ProtoWriter...did you ever succeed in building 
that code targeting .NET MF Framework?

Original comment by maio...@gmail.com on 25 Feb 2013 at 12:32

GoogleCodeExporter commented 8 years ago
Sure, I did some preliminary work to try to get it working there; however, I 
can't say that I've tested it a: recently, or b: thoroughly. If you have a 
requirement based around 4.3 I don't mind giving it a try, but at the same time 
I'm not a MF expert...

Original comment by marc.gravell on 25 Feb 2013 at 1:17

GoogleCodeExporter commented 8 years ago
It would be nice at least to try to build a couple of samples just to know
whether something "hard" misses, but I'm quite optimistic it isn't so :)

Original comment by maio...@gmail.com on 25 Feb 2013 at 4:56

GoogleCodeExporter commented 8 years ago
Ach! I tried to fork from .NET MF 3.0 build batch and adjust some minor 
differences (for example Assemblies now are located depending their 
"endianness"), but building fails with many errors, apparently due to 
reflection stuff...maybe you can give it a look and suggest me a way to go on?

Thanks!

Original comment by maio...@gmail.com on 26 Feb 2013 at 12:05

GoogleCodeExporter commented 8 years ago
Hi Marc.

Any news about that?

Original comment by maio...@gmail.com on 28 Feb 2013 at 8:09

GoogleCodeExporter commented 8 years ago
As an update: I've worked through the pile of compiler errors, coming up with 
alternative implementations of various bits, or cutting features that just 
can't be supported. When I compile now I get a CLR_E_FAIL which I need to look 
at - haven't had chance yet. I also have some work to do to re-implement 
MemoryStream, since that it used internally - right now I have it stubbed with 
NotImplementedException()s.

So: some work still to do, but fundamentally it looks possible...

Original comment by marc.gravell on 28 Feb 2013 at 4:27

GoogleCodeExporter commented 8 years ago
Wow! Definitely good news!

Like others of my fellow co-founders of Italian community about .net mf 
(www.tinyclr.it), I'm looking the best way to promote interoperability with 
java/android world in scenarios concerning an embedded (.net mf based) device 
exchanging messages through usb/bluetooth with small and cheap android devices 
used as HMI peripherals, with much richer features if compared to a standard 
lcd-display-based solution at a cost much lower (a microcontroller board 
capable of driving a 320x240 lcd display requires much ram and core speed, with 
display cost being not much lower than 50$, when with 40$ now you can buy 
480x270 android devices (with wifi and of course on-board battery capable of 
running UI-based features very very smoothly with the richness of Java/Android 
SDK development stack).

Well, as you would likely already understood, cross-platform efficient 
serialization of arbitrary business entities is essential for all this to 
happen.

Thanks again for your amazing work!

Original comment by maio...@gmail.com on 28 Feb 2013 at 7:59

GoogleCodeExporter commented 8 years ago
Just please keep in mind that all work I do on this library comes from my own 
time, which I am in precious short supply of. I cannot commit to any specific 
deadline, nor even commit that it is fully achievable (it looks promising, 
though) - all I'm saying is: don't "bet" on me getting this done this week 
(etc). If you see what I mean. I wouldn't want you to lose out if I can't get 
enough time immediately.

Original comment by marc.gravell on 1 Mar 2013 at 12:51

GoogleCodeExporter commented 8 years ago
Don't worry, I perfectly understand (and know very well) what you're talking 
about, since we too succeed in developing these kinds of projects only by mean 
of our (scarce) spare time and a lot, lot of passion!

Thanks anyway!

(P.S. Please don't consider it an attempt to corrupt you :) , but if you need a 
"real" .NET MF board to run some tests on I can provide one in matter of days)

Original comment by maio...@gmail.com on 1 Mar 2013 at 4:28

GoogleCodeExporter commented 8 years ago
Hi Marc, any news about .NET Micro Framework porting?

Thanks and best regards.

Original comment by maio...@gmail.com on 8 Apr 2013 at 5:02

GoogleCodeExporter commented 8 years ago
I haven't yet had chance to address the peculiar CLR_E_FAIL; sorry. Consider it 
re-bumped and me suitably chastised.

Original comment by marc.gravell on 10 Apr 2013 at 8:06

GoogleCodeExporter commented 8 years ago
Ah ah, I admit I had to use a dictionary to actually get the meaning of 
"chastised", but it was worth it :)

Original comment by maio...@gmail.com on 11 Apr 2013 at 10:53

GoogleCodeExporter commented 8 years ago
Hi Marc. Sorry to be a nuisance, but do you have any news?

Thanks!

Original comment by maio...@gmail.com on 18 Jun 2013 at 8:04

GoogleCodeExporter commented 8 years ago
A year later, any interest in getting NETMF working?

Original comment by osst...@gmail.com on 8 May 2014 at 2:39

GoogleCodeExporter commented 8 years ago
More than ever! NetMF is getting more attention because of IoT wave and
Microsoft recently announced new investments on it. Even more, at this time
IoT-enabling protocols (such as mqtt and amqp) miss an efficient
serialization format even though they recommend lightweightness.

Is it enough? :-)
Il 08/mag/2014 16:39 <protobuf-net@googlecode.com> ha scritto:

Original comment by maio...@gmail.com on 9 May 2014 at 4:38

GoogleCodeExporter commented 8 years ago
OK, OK; as soon as I get breathing space, I'll have a look at what can be made 
to work.

Original comment by marc.gravell on 9 May 2014 at 9:03

GoogleCodeExporter commented 8 years ago
Hi,
has in the meantime anyone been able to use protobuf-net on .net micro 
framework?
If there is any other library that enables me to use protobuf on the .net mf 
I'm thankful for every hint.
Cheers

Original comment by flowsp...@googlemail.com on 25 Mar 2015 at 8:28

GoogleCodeExporter commented 8 years ago
I have tried twice to convert the existing codebase to be MF compatible; it is 
very awkward. This would require significant effort (which, as stated, I have 
already attempted, unsuccessfully, twice).

Original comment by marc.gravell on 25 Mar 2015 at 1:32