hey #rust people. is bindgen + dlopen a thing? if i've got a big honking .h file and i don't wanna write so many dlsym things (libloading or otherwise) by hand, can i tell bindgen to not expect the library in question to be available at rust's link time?
Conversation
Notices
-
liffy 💜 (lifning@cybre.space)'s status on Sunday, 23-Dec-2018 13:27:00 EST liffy 💜 -
Jamey Sharp (jamey@toot.cat)'s status on Sunday, 23-Dec-2018 14:40:54 EST Jamey Sharp @lifning That's a fascinating question and I don't know the answer, but: I feel fairly confident in saying at least that you can't have function declarations that refer to external definitions without making those definitions available to the linker. So I think bindgen would have to generate entirely different code, involving explicit calls to dlsym, in order to do what you're asking for. But maybe it does offer that option, or maybe I'm wrong!
-