Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
I am working on a rust library that can be used from multiple languages. To reduce development complexity, I try to generate as much code of the language bindings as possible. For the C# bindings, I use the C binding as a basis.
The existing code generator in C# does not fit my use case, as the resulting API is fine for internal use, put lacks the polish I want for a safe-ish public API. The approach I tried here means I only have to create a new C API and a C# method "magically" shows up in the git diff.
State of the patch set
The code is not final by any means - it contains TODOs and currently breaks when not following a specific naming convention for example.
I also changed to much unrelated code and did not structure the commits properly.
For my specific use case, it seems to work fine. The code in cccb/servicepoint#16
crates/servicepoint_binding_cs/ServicePoint/*.g.cs
is generated by my fork.I am open to basically starting from scratch again or splitting the changes into multiple patch sets for upstreaming.
My questions for you
Span<byte>
?