labstreaminglayer / liblsl-Csharp

C# bindings for liblsl
MIT License
28 stars 18 forks source link

Upgrade to .NET 8.0? #27

Open LiamOverett-AMRC opened 2 months ago

LiamOverett-AMRC commented 2 months ago

Is there an appetite to upgrade to .NET 8.0?

I was thinking something along the lines of what @dmedine did?

I've seen issues and PRs across the LSL wrappers mentioning legacy support for older versions of that language (e.g. Python) but would that need to be done for the C# wrapper, especially as it hasn't got a NuGet package yet?

If legacy support was not needed then this would be a good opportunity for a fresh start and for the wrapper to meet the general naming conventions as well as splitting the classes across multiple files for better delineation. Perhaps a new repository called LSL.Net like mentioned here.

dmedine commented 2 months ago

The wrapper I made is not completely finished, but I'd be happy to have anyone pick it up. 90% of it is done but there are some design things that should be rethought. I use it whenever I need LSL in C# and I have never seen any bugs, but there is a glaring memory management issue I have yet to solve in the List<List> variant of pull_chunk.

That said, it would be trivial to upgrade to .NET 8.

LiamOverett-AMRC commented 2 months ago

Yes please. I'm not in a position to recommend syntax practices in C#. I'll continue to beat the drum that it needs to work anywhere Unity works, but other than that I have no preference.

And I don't want to have a separate LSL.cs for Unity and general C#; we had that before and it led to some users using an outdated file, creating support headaches.

Have you tried your wrapper with Unity? Just a couple quotes from other PRs/issues about the importance of a C# wrapper working for both Unity and .NET.

What are some of the "design things that should be rethought"?

myd7349 commented 2 months ago

Hi, guys! If anyone is interested, I recently wrote a C# wrapper for liblsl and published it on NuGet. It's not perfect yet(and may have bugs), but it's getting close to my goal. I also plan to merge some of the issues I've already resolved into this repository.

https://github.com/myd7349/SharpLSL