Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to Zenoh V0.6.0-dev.0 #2

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

Conversation

sanri
Copy link

@sanri sanri commented Sep 17, 2022

No description provided.

@JEnoch
Copy link
Member

JEnoch commented Sep 21, 2022

Hi @sanri,

Thanks for your interest in Zenoh and for your efforts upgrading this C# API!
By lack of time and resources we unfortunatly had to pause the developments of this API, prioritizing the most used APIs so far: Rust, Python and C. But we'll be happy to have contributors helping us to develop a Zenoh C# API that comply with the semantic and style of the other Zenoh APIs.

Just to let you know, we're about to release a new version of Zenoh that includes some significative changes in all its APIs (zenoh-c included).
You can see the work in progress in all the api-changes branches for our repos. And those branches will be merged in to the main branches of their respective repos in the coming days. Then, we'll release all as v0.6.0-beta.1.

We think the best is for the C# API update to rely on this new zenoh-c v0.6.0-beta.1. Also, we would like to expose in C# a similar semantic than the other APIs (i.e. type and function names, builder patterns...), but at the same time relying on the common C# idoms (e.g. implement IDisposable).

Would you like to help us achieving this goal ?
If so, I encourage you to join us on our Discord where you could discuss this with @p-avital who is the lead for all Zenoh APIs.

@p-avital
Copy link

Hi,

To be more precise, what we would be looking for would be:

  • Implement IDisposable for all types, with a finalizer ensuring that dispose is called during a GC pass if the user failed to dispose of things properly.
  • Use default values for extra parameters, much like we've done in the upcoming python API (also on branch api-changes), and if you know of a way to restrict their usage to named usage, it would be preferable.
  • For a lot of things, we prefer accepting many different types as input. I think the most well suited way of doing that in C# would be a combination of generics (relying on interfaces similar to the traits required in the Rust version) and overloads (for standard types, which we unfortunately cannot implement interfaces for externally).

I haven't done C# in a long time, so I'm experimenting with it at the moment to figure out how we can best leverage it to make an API for Zenoh as comfortable as possible.

If you'd rather keep your bindings as reexports of the C bindings, I completely understand: I'm potentially asking for a lot of work. If you don't feel like doing it, we'll push it back on our todo-list and try to get to it eventually :)

@sanri
Copy link
Author

sanri commented Sep 21, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants