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

Is there a document for Coreclr on the Android platform #90160

Closed
CeSun opened this issue Aug 8, 2023 · 12 comments
Closed

Is there a document for Coreclr on the Android platform #90160

CeSun opened this issue Aug 8, 2023 · 12 comments
Labels
area-Host os-android question Answer questions and provide assistance, not an issue with source code or documentation. runtime-coreclr specific to the CoreCLR runtime

Comments

@CeSun
Copy link

CeSun commented Aug 8, 2023

If I want to embed coreclr on an Android app (c++), how should I locate the directory of the standard library? Has there been a change in the way dependencies are loaded?

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 8, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Aug 8, 2023
@lambdageek lambdageek added os-android question Answer questions and provide assistance, not an issue with source code or documentation. labels Aug 9, 2023
@ghost
Copy link

ghost commented Aug 9, 2023

Tagging subscribers to 'arch-android': @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Issue Details

If I want to embed coreclr on an Android app (c++), how should I locate the directory of the standard library? Has there been a change in the way dependencies are loaded?

Author: CeSun
Assignees: -
Labels:

os-android, untriaged, needs-area-label

Milestone: -

@lambdageek lambdageek added the runtime-coreclr specific to the CoreCLR runtime label Aug 9, 2023
@jeffschwMSFT
Copy link
Member

Have you checked out this document? https://learn.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting

Android is not an officially supported platform for coreclr. Howerver, we have a mono offering on Android.

@ghost
Copy link

ghost commented Aug 9, 2023

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

If I want to embed coreclr on an Android app (c++), how should I locate the directory of the standard library? Has there been a change in the way dependencies are loaded?

Author: CeSun
Assignees: -
Labels:

question, area-Host, os-android, untriaged, runtime-coreclr, needs-area-label

Milestone: -

@CeSun
Copy link
Author

CeSun commented Aug 9, 2023

Have you checked out this document? https://learn.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting

Android is not an officially supported platform for coreclr. Howerver, we have a mono offering on Android.

Hello, this document I have read, mono I tried on windows platform, mono api and coreclr is very different, I need to maintain two embedded code, which is a lot of trouble.

I see that mono's dynamic library exports coreclr compatible c++ apis, Is it available? Maybe one day Android coreclr is ready and I can easily replace it.

In addition, want to ask the mobile end of coreclr is not planned for the time being? How many.NET versions will still use mono?

@jeffschwMSFT
Copy link
Member

In addition, want to ask the mobile end of coreclr is not planned for the time being? How many.NET versions will still use mono?

Nothing to share at this point. If you have not taken a look, we are shipping an preview version of iOS using Native AOT.

mono api and coreclr is very different

That is true. Though depending on your scenario, it likely is less specific code than you might think. Often these PAL layers are thin and once you have the runtime started, you can do most of the interesting logic in managed (which is shared code).

I see that mono's dynamic library exports coreclr compatible c++ apis, Is it available?

Can you elaborate? I am not quite sure what you are asking.

@CeSun
Copy link
Author

CeSun commented Aug 10, 2023

In addition, want to ask the mobile end of coreclr is not planned for the time being? How many.NET versions will still use mono?

Nothing to share at this point. If you have not taken a look, we are shipping an preview version of iOS using Native AOT.

mono api and coreclr is very different

That is true. Though depending on your scenario, it likely is less specific code than you might think. Often these PAL layers are thin and once you have the runtime started, you can do most of the interesting logic in managed (which is shared code).

I see that mono's dynamic library exports coreclr compatible c++ apis, Is it available?

Can you elaborate? I am not quite sure what you are asking.

3edcd02bb77560c1e989727a7316230d
These apis are the same as those provided by coreclr's dynamic library, are they available?

@vcsjones vcsjones removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 10, 2023
@jeffschwMSFT
Copy link
Member

@SamMonoRT who may have some insight on the mono exports

@SamMonoRT
Copy link
Member

@fanyang-mono
Copy link
Member

@CeSun those methods that you highlighted are defined in main-core.c (https://github.com/dotnet/runtime/blob/7bc9f6bd9652fcfcb850d7ac3f52f9a1bb9d1431/src/mono/mono/mini/main-core.c) When using Mono runtime, they are merely wrappers which call into mono functions eventually. I hope this answer your question.

@CeSun
Copy link
Author

CeSun commented Aug 11, 2023

@CeSun those methods that you highlighted are defined in (https://github.com/dotnet/runtime/blob/7bc9f6bd9652fcfcb850d7ac3f52f9a1bb9d1431/src/mono/mono/mini/main-core.c) When using Mono runtime, they are merely wrappers which call into mono functions eventually. I hope this answer your question.main-core.c

What platforms are supported by these APIs? Does it support mobile platforms?

@fanyang-mono
Copy link
Member

@CeSun For using Mono on Android, we actually have a complete end to end solution. Have you considered Xamarin.Android (https://learn.microsoft.com/en-us/xamarin/android/)? Or if you are looking for cross platform mobile development, there is .NET MAUII (https://dotnet.microsoft.com/en-us/apps/maui).

To answer your question directly, I would expect them to work on Android. But I am not 100% sure. Feel free to try it out.

@akoeplinger
Copy link
Member

Looks like the question was answered, closing this issue.

CoreCLR on Android is also tracked via #4296

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Dec 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Host os-android question Answer questions and provide assistance, not an issue with source code or documentation. runtime-coreclr specific to the CoreCLR runtime
Projects
None yet
Development

No branches or pull requests

7 participants