Skip to content

Conversation

@huoyaoyuan
Copy link
Member

Taking NativeAOT implementation and adapting coreclr behavior. The remaining code for P/Invoke resolver isn't changed.

Mono implementation can be update too, but I'm unsure about how the fallback registered for wasm should be handled.

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 24, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Oct 24, 2025
@huoyaoyuan huoyaoyuan added area-System.Runtime.InteropServices and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 24, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

#include "nativelibrarynative.h"

// static
extern "C" INT_PTR QCALLTYPE NativeLibrary_LoadFromPath(LPCWSTR path, BOOL throwOnError)
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better to split this into unifying NativeLibrary_LoadFromPath/NativeLibrary_FreeLib/NativeLibrary_GetSymbol in one straightforward PR, and do the policy-heave APIs in a separate PR that is unlikely to be straightforward and that will need very careful review?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I think so. The detailed behavior of LoadBySearch are not exactly the same. If we feel too complex we can also keep it unmanaged for coreclr.

@huoyaoyuan huoyaoyuan changed the title Consolidate NativeLibrary API to managed implementation Consolidate direct paths of NativeLibrary API to managed implementation Nov 4, 2025
@jkotas
Copy link
Member

jkotas commented Nov 4, 2025

Thanks! @AaronRobinsonMSFT @jkoritzinsky Could you please review this as well?

@AaronRobinsonMSFT
Copy link
Member

@elinor-fung or @agocke Do you know if the hosting test legs were triggered above?

@elinor-fung
Copy link
Member

Do you know if the hosting test legs were triggered above?

Yes - they are in the Installer_Build_And_Test legs. For example: osx-arm64 Debug Installer_Build_And_Test shows the 'Send to Helix' step kicking off tests that successfully ran.

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 11.0.0 milestone Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Runtime.InteropServices community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants