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

Dynamically loaded binary modules #119

Open
olofson opened this issue Jan 26, 2019 · 0 comments
Open

Dynamically loaded binary modules #119

olofson opened this issue Jan 26, 2019 · 0 comments

Comments

@olofson
Copy link
Owner

olofson commented Jan 26, 2019

Most of the binary (native code) modules, and in particular, the Eelium ones, should be possible to compile to DLL/so/dylib, and loaded on demand. For maximum portability and flexibility, it should remain an option to compile these modules for static linking as well, in a similar fashion to how they're handled now.

There was some work done on this long ago (before 0.3.x, IIRC), but it was abandoned due to various issues with how EEL used to handle imports, and also, design issues with SDL 1.2. Since then, the module handling has been refactored, and SDL 2.0 (see #71) integrates in a much cleaner fashion than 1.2.

One remaining problem is that shared libraries linking to symbols exported by the loading executable is not portable. (This happens when a binary EEL module tries to call EEL core functions when EEL is statically linked into the host application. It should be fine as long as the EEL core is also a DLL/so/dylib...)

The most portable solution is probably to provide the EEL core API via a struct of function pointers or similar, passed to the module init function. This also has the upside of allowing host applications to keep multiple isolated EEL "domains" in one process (for example, cleanly separated standard and hard real time domains), which can even use different EEL versions.

(Related to #118, #53, #115, #70, #47, and #68.)

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

No branches or pull requests

1 participant