-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
Loading x64 libraries from arm64 code #1273
Comments
It can, but not directly. Create a special wrapper for a lib is possible, as long as you now the API. |
Well that might be a problem. We don't know it's api 100%, and all the interop is done through C#. Are there docs for that feature anywhere? |
No, no doc. Basicaly, the idea is to build box64 as a library that expose the needed API, and wrapped calls to execute the underlying x86_64 code. |
So libbox64 (as a library, let's call it libbox64 for now), could expose, say:
If it's possible, that'd effectively be enough for our use case. The first function we call from the lib is called CreateInterface (via dlsym/dlopen), which returns a pointer to a C++ class with a specified name (as const char*). The actual calling of the functions in the C++ class is done with some math to calculate each function's offset in the vtable, so no problem there with box64? The second one is a callback system (also retrieved with dlsym), called rapidly every ~5ms. This returns a struct to some callback data. I presume this is also not an issue with box64, since the data comes from the lib. I know one possible problem area though, the lib spawns other x64 (and in some cases x86) processes for some (optional) features, like shader management. |
Hi. I make an application (OpenSteamClient), which is build with dotnet and C#.
This supports being natively compiled for arm64, x64 and lots of platforms. However an underlying library is only available as 64-bit or 32-bit (works the same regardless).
Can box64/box86 be used with a native app to load a non-native library and have it work?
Sorry if this has been asked before, couldn't find anything on the topic.
The text was updated successfully, but these errors were encountered: