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

[android] Make Android app on coreclr use host-runtime contract and provide external assembly probe #112938

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Feb 26, 2025

  • Update app builder targets / tasks to allow specifying multiple runtime header directories
  • Make Android app on coreclr use host_runtime_contract::external_assembly_probe

Copy link
Contributor

Tagging subscribers to this area: @akoeplinger, @matouskozak
See info in area-owners.md if you want to be subscribed.

@elinor-fung elinor-fung force-pushed the androidSample-useProbe branch from 00cddbb to 1ea37be Compare February 27, 2025 01:34
@ivanpovazan ivanpovazan self-requested a review February 27, 2025 15:49
Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com>
appctx_keys[0] = "RUNTIME_IDENTIFIER";
appctx_keys[1] = "APP_CONTEXT_BASE_DIRECTORY";
appctx_keys[2] = "TRUSTED_PLATFORM_ASSEMBLIES";
appctx_keys[2] = "HOST_RUNTIME_CONTRACT";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the Android app on coreclr always go through the external assembly probe, which is more like the real scenario. Is there usefulness in keeping the TPA property / runtime loading from disk and letting that be enabled via some define that can be specified when building the app?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. We only loaded from disk before because it was the easiest path.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Steve, although it would be interesting to see the difference in performance.

Copy link
Member

@steveisok steveisok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@ivanpovazan ivanpovazan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

I left a few minor notes

appctx_keys[0] = "RUNTIME_IDENTIFIER";
appctx_keys[1] = "APP_CONTEXT_BASE_DIRECTORY";
appctx_keys[2] = "TRUSTED_PLATFORM_ASSEMBLIES";
appctx_keys[2] = "HOST_RUNTIME_CONTRACT";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Steve, although it would be interesting to see the difference in performance.

@ivanpovazan
Copy link
Member

/azp run runtime-androidemulator

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@elinor-fung
Copy link
Member Author

/azp run runtime-androidemulator

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants