-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[mono] Add support for library mode in the aot compiler #79377
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsAs a native developer targeting Android, iOS, or wasm, I would like to use a shared library containing custom managed code plus the mono runtime so that I can call into managed functions from my native application. The library should take the same approach as NativeAOT, only exporting the symbols from managed functions decorated with
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsAs a native developer targeting Android, iOS, or wasm, I would like to use a shared library containing custom managed code plus the mono runtime so that I can call into managed functions from my native application. The library should take the same approach as NativeAOT, only exporting the symbols from managed functions decorated with
|
Please do not forget to add includes and libraries if you use custom directories with includes and libraries for all platforms
Like for custom object c / headers for adapters like USB Device supports or any device supporting.... or plugins with platform-engine desktop/shell managements or for WebAssembly with functions for current browser's runtime like Electron or Chromium etc... PS: Please put support with AppImage for Linux if you don't worry to get warning like not found library for custom shared libraries.
I hope you have to add more features in Net 8.0 |
Hello @steveisok We are currently using the Embeddinator 4000 toolkit to make a shared library written in c# available as a native mobile SDK. Seeing the similarities in the use case, we were wondering if this was a suitable replacement seeing the E4K tool has been EOL for some time now. |
It's a suitable replacement if all you want is a native shared library you can call into that doesn't rely on any android or ios bindings. That's at least where we are starting from right now. |
Hi @steveisok , thank you for your answer and work on this issue.
|
Yes, as long as it doesn't contain bindings, then you should be able to expose entry points that in this case wrap the SDK.
Yes, we have an experimental workload you can use. There is a sample repo to help you get started https://github.com/steveisok/library-mode-sample
Yes, we are planning on having this feature for .NET 8. As of right now we are targeting iOS/MacCatalyst, Android, and Wasm.
Try not to use them :-). I'm not sure what the behavior will be. |
@steveisok do we have some kind of docs for this? Or is this issue the doc :-) |
We need a how to for mobile. Both for nativeaot and mono runtimes. |
@steveisok @vitek-karas we have a tracking issue for it: #96742 |
As a native developer targeting Android, iOS, or wasm, I would like to use a shared library containing custom managed code plus the mono runtime so that I can call into managed functions from my native application. The library should take the same approach as NativeAOT, only exporting the symbols from managed functions decorated with
[UnmanagedCallersOnly(EntryPoint = "")]
.[UnmanagedCallersOnly(EntryPoint = "")]
[mono] Export unmanagedcallersonly method symbols #79424 ✅
[android][ios] Add LibraryBuilder task to support aot library mode #81919 ✅
[Mono]: Add support for lazy runtime init in native-to-managed wrapper, similar to NativeAOT library build. #82253 ✅
[tasks] Add auto runtime initialization template to LibraryBuilder #83050 ✅
[mono] Introduce designated direct pinvokes to mono aot compiler #79721 ✅
The text was updated successfully, but these errors were encountered: