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

Really great project - What's about NetStandard #2

Open
bernd5 opened this issue May 9, 2017 · 8 comments
Open

Really great project - What's about NetStandard #2

bernd5 opened this issue May 9, 2017 · 8 comments

Comments

@bernd5
Copy link

bernd5 commented May 9, 2017

Hi Alex,

first of all I would like to thank you very much for contributing your great cs2cpp project to us. Actually it generates really good and readable C++ Code - much better than CoreRT (it's more low-level).

For me it would be really nice if your CoreLib-implemantion would support netstandard (e.g. 1.4).
I saw you integrated many tests from Microsoft to your project (good idea). So I tried to execute them. The first issue for me was that I had to adjust your paths in CompilerHelper.cs - it would be good if there would be relative to the repository. Then I tried to execute some of the tests but they failed again - System.Globalization.Calender was not found what I couldn't believe (In the past I had a lot of issues with "finding code"). But then I checked the CoreLib directory - and it was really not there - but I found it in mscorlib dir. So my question is: Where you got the CSharp source code for the CoreLib and mscorlib - which version? What is your preferred lib (CoreLib or mscorelib)?
How many MS-tests are successfull?

Can we help you?

Greetings,

Bernd

@ASDAlexander77
Copy link
Owner

ASDAlexander77 commented May 10, 2017

FOA Thank you for your interest.

  1. I am planning to migrate from CoreLib to .NET Core CoreLib. Initially I was using Mscorlib from .NET Micro as CoreLib this is why you can't find a lot of classes there. I have tried to use original Mscorlib but it contains tons of useless classes so it was not practical to use it

  2. Yes, many tests are not working now as they rely on internal native implementation which I am missing at that moment. Additionally many tests using a lot of Reflection functionality which I am not supporting at that moment. So I am using Test_Mono_Tests and Test_Mono_GTests.

  3. What is your preferred lib (CoreLib)
    My preferred is CoreLib but now I am really thinking to adjust support for .NET CoreLib (from CoreRT, not from CoreFX) and drop Mscorlib at all

  4. Can we help you?
    I need help with native implementation which can be used from CoreRT but I just need minimum functionality as I want to have cross platform compilation ability and to have minimum dependency. This is why I am compiling a lot of "code" into CoreLib header.

@ASDAlexander77
Copy link
Owner

Additionally I would like to implement PInvoke as many C# projects as Avalonia rely on it

@ASDAlexander77
Copy link
Owner

I am working on functionality to compile mscorlib from CoreCLR. Many things already done

@bernd5
Copy link
Author

bernd5 commented Jul 12, 2017

Great to hear

@ASDAlexander77
Copy link
Owner

finally finished cleaning up the code to compile CoreCLR mscorlib.

to do so you need to do few steps

  1. git clone https://github.com/dotnet/coreclr.git
  2. cd coreclr
  3. init-tools.cmd
  4. cd ..
  5. Cs2Cpp.exe /release C:\Dev\Gits\coreclr\src\mscorlib\System.Private.CoreLib.csproj
  6. cd System.Private.CoreLib
  7. build_prerequisite_vs2017_release.bat
  8. build_vs2017_release.bat

ok, now you have lib (size 350mb) but it will have missing native functions. I am working on it to be able to compile exe file

@ASDAlexander77
Copy link
Owner

ASDAlexander77 commented Jul 21, 2017

Now you can compile CoreCLR and CoreFX projects

Cs2Cpp.exe /release <path_to_git>\coreclr\src\mscorlib\System.Private.CoreLib.csproj

Cs2Cpp.exe /release <path_to_git>\corefx\src\System.Private.Uri\src\System.Private.Uri.csproj /corelib:System.Private.CoreLib.dll /p:Configuration=netstandard2.0-Windows_NT-Release

@jacano
Copy link

jacano commented Jul 21, 2017

Great work, you made an awesome job there reusing a modern mscorlib such as System.Private.CoreLib
Just wondering, did you make some progress on the internal native implementation of reflection or still missing? Do you have any roadmap or plan for it?

@ASDAlexander77
Copy link
Owner

ASDAlexander77 commented Jul 25, 2017

I did work a bit with reflection and native implementation (only required minimum). Idea was to reuse native implementation from CoreCLR or CoreRT but I am not there yet

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

3 participants