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

C++ support for CoreCLR via C++/WinRT #80

Closed
MathiasMagnus opened this issue Jan 16, 2017 · 4 comments
Closed

C++ support for CoreCLR via C++/WinRT #80

MathiasMagnus opened this issue Jan 16, 2017 · 4 comments

Comments

@MathiasMagnus
Copy link

Could a similar tool in nature to cppwinrt.exe be used by the coreclr team to bring c++ support to .net core? People are eager to author and consume .net core classes written in c++ (though currently people are asking for c++ /cli support, but that is problematic on many ends. A tool similar to C++/WinRT could be a better solution.
I am particularly interested in consuming the XML implementation of .Net Core from C++ in a cross-platform manner (Win and Linux, MSVC and Clang/GCC), and also to bring numeric libraries (FFT and such) from C++ over to being consumed in PowerShell Core (to provide an alternative to Python).

Your thoughts?

Cheers,
Máté

@MathiasMagnus
Copy link
Author

@kennykerr
Copy link
Collaborator

C++/WinRT is focused on standard C++, which is a wildly different environment to that of the CLR. While I can imagine a tool that would make using C++ with the CLR more convenient, that is outside the scope of this project and we have no plans to do that.

In many ways, the Windows Runtime provides a better “common language runtime” than the CLR. 😉

@MathiasMagnus
Copy link
Author

I understand that C++/WinRT is focused on standard C++, and given how (I guess mostly you) managed to map C++/CX to an ISO C++ template library through a custom compiler (cppwinrt.exe), I was sort of hoping the same love'n'care could be given to C++/CLI as well. (I do not understand how much CX and CLI differ on the ABI level. As an end-user, they seem to be fairly close.)

As I said, .Net Core is evolving rapidly and all the languages built atop it. Being a part time linux sysadmin (beside doing my physics PhD), I have acquainted myself with PowerShell to a point I feel more at home in it than Bash. PowerShell Core became my preferred shell on both Windows and Linux. For all my HPC applications I code only standard C++ and use portable libraries, such as MPI, OpenCL, OpenGL, SYCL, etc. and we also teach these at our university.

I would love, to merge my knowledge of PS with ISO C++, and wrap my stuff with either C++/CLI or a template library and invoke a custom compiler that generates the manifest file for the resulting .Net Core Assembly and use it on both Windows and Linux (being a binary, I need to do the same on both ends). This way, PS would be a viable alternative to Python, having a similar magnitude of prewritten libraries, only in C#.

Going further, being a member of the Virgo collaboration, which is a joint effort with LIGO, it would be nice to mimic the much envied PyCBC software infrastructure, but built atop .Net Core. Reusing PyCBC on both ends is hazardous, because running the same software on the data of both gravitational wave detectors will bound to match if the software is buggy. Building something atop Python again will result in pulling in the same dependencies, etc. It would be nice to use .Net Core as the basis for an alternative framework that may be subject to bugs in different codebases. :)

@kennykerr
Copy link
Collaborator

Thanks for the suggestions!

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

No branches or pull requests

2 participants