-
Notifications
You must be signed in to change notification settings - Fork 103
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
Skeleton for C# #404
Skeleton for C# #404
Conversation
You're timing is pretty spot on. I pushed up an afternoon's worth of work on a C# language projection last Friday: https://github.com/microsoft/xlang/tree/devhawk/cool1. (Note "COOL" was the original code name for C# - I'm using it as a place holder name for this branch until we figure out what to name it) So far, all I have is the publicly projected types - i.e. exactly zero implementation code, just the structure. I have some other things to work on today (May 13th) but I will definitely check this branch out! After we get a chance to review each other's code, we should definitely chat about how to combine effort here. To answer your other questions:
|
Thanks @devhawk - to save you time, I don't think there's much content in this PR, it's more about getting the skeleton in place. We had some projection tech with the basics, based on a custom tool with libclang. I had started to port to xlang (very smooth process btw!), but can't recall exactly how far it got. I have some additional changes which aren't in this PR. |
I see you made some progress on generating implementation. So far, all of my projected methods simply throw not impl! If you've got some thoughts on interop, I'd love to hear them. We were hoping to build on C#'s proposed compiler instrinsics support but it doesn't look like that's going to make the next release. Can you share your custom tool - or at least how the custom tool does interop? |
We are using a similar technique to CppSharp. It might look something like this:
|
You might want to take a look at the SharpGenTools project as inspiration for a way to do the reverse-callback direction (passing C# implementations to other xlang languages). |
Closing this PR. The https://github.com/microsoft/xlang/tree/devhawk/cool1 branch obsoletes it. |
Not for merging! This is a placeholder PR for discussion only.
If there is interest, we have some code which handles the very basics - enums, structs, interfaces+methods. It's based on master of ~6 months ago so would need some modernizing, which we can do.
Would an incomplete implementation be accepted?
Is the layout/naming in the form you want?
Which branch should we use as a base?
Is there anything else we should be aware of?
Thanks.