-
Notifications
You must be signed in to change notification settings - Fork 48
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
feat(ffi): initial C# bindings (connector only) #423
Conversation
Coverage Report 🤖 ⚙️Past: New: Diff: +0.00% [this comment will be updated automatically] |
formatter seems not working anymore, it does not tell you where the format is wrong, neither could update: somehow formatter require me to fix a place I never edited, it is inside |
We don’t expose rustls, we’ll use SslStream in C#. https://sans-io.readthedocs.io/how-to-sans-io.html#why-write-i-o-free-protocol-implementations IronRDP is already largely following this philosophy (and IronVNC too). We do expose higher level helpers to simplify things in upper layers, but this is not part of the "core crates".
Let’s not expose the API for static channels like we do in Rust. I think we can safely hardcode the supported channels like this. We’re not going to implement static channels in C# either, so there is no need to care too deeply about genericity here. As for "Framed", it’s not supposed to be exposed. This is a higher level helper for Rust code.
We stick to the "core" API, which is "sans-IO" and thus do not require choosing between async or not. However, we should provide an higher level API which may be async. However, let’s stick to the standard C# library in the higher level helpers. I don’t think we need much more than that and it will save us maintenance time. If a fancy dependency is required, let’s handle that downstream (in RDM). |
Cargo.lock
Outdated
[[package]] | ||
name = "anyhow" | ||
version = "1.0.80" | ||
version = "1.0.81" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" | ||
checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Avoid to update the Cargo.lock more than necessary. We use dependabot to update it piece by piece in a controlled way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a .gitattributes file like we have in Picky?
https://github.com/Devolutions/picky-rs/blob/master/.gitattributes
Co-authored-by: Benoît Cortier <[email protected]>
Co-authored-by: Benoît Cortier <[email protected]>
Co-authored-by: Benoît Cortier <[email protected]>
Co-authored-by: Benoît Cortier <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!!
Created skeleton for FFI.
Connector module is working now. Please see
ffi\dotnet\Devolutions.IronRdp.ConnectExample
Note: this is a draft, we'll need to discuss more about
There are some imperfections/todo/fixme for now, my apologies.