TheoryInMotion
Deno.dlopen does not support flags
I am looking to integrate the SDL3 lib, and wanting to get the callback path to work. However, it requires a flag to be enabled, to allow the function pointers to be called.
https://wiki.libsdl.org/SDL3/SDL_MAIN_USE_CALLBACKS
Due to the nature of the project, I don't really want to force people to recompile for multiple targets.
I've seen the deno_python lib's solution, involving loading libc to use the libc dlopen, to pass the flag.
How many times will shared objects be loaded on multiple calls? Would it be possible to load it from libc (or something else), to open it, defining the flag, and then load it separately, through
Deno.dlopen
to bind the callback pointers? Does Deno do any sandboxing, there, under the covers?
Is there a more sensible solution that wouldn't involve shipping C, that could both bind callbacks, and set the flag?1 replies