neuecc / UniRx

Reactive Extensions for Unity
MIT License
7.07k stars 893 forks source link

Add support for .net standard to project #300

Open grofit opened 6 years ago

grofit commented 6 years ago

Unity recently mentioned in an article on .net update that ideally libraries for unity should be targetting .net standard profile:

The .NET Standard 2.0 profile matches the profile of the same name published by the .NET Foundation. This is a great profile to choose for a new Unity project. It is smaller than .NET 4.x and we recommend it for size-constrained platforms such as mobiles. In addition, we’ll make sure this profile works on all platforms Unity supports. If you are a developer of libraries used with Unity, this is the profile you want to target.

Given the nuget version of the project is out of date, and unity are going to be slowly phasing out the old runtime now would be a good time to update the nuget project and add .net standard support in. I would probably also suggest dropping support for anything < unity 2017 as you have older releases for that, it would make the code base simpler to maintain and build.

If it helps I have made a branch which is a large re-work of the codebase which is still not entirely finished but supports .net standard, has full test coverage with xUnit and has split the projects into a purely .net layer and a unity layer:

https://github.com/grofit/unirx/tree/pure-dotnet-and-namespaces

grofit commented 4 years ago

Any progress on this topic?

RDeluxe commented 4 years ago

Would also like to hear if somebody pushed that further. I'm no currently able to pursue any effort (we need to ship and I won't upgrade to System.Reactive on this project anyway) but I'm looking at MagicOnion + MessagePack for our next client+server project and it would be great to be able to use RX.Net everywhere.

mattkanwisher commented 2 years ago

now that .net6 is out and AOT is pretty big for wasm also, i'm wondering if anyone will revisit this?