how to set custom path to libpython3.so? #3053
-
hi, i'm working at a project right now and i would like to embed the python interpreter within the rust main program but i would also like to have the python3.so embedded into the binary or at least have pyo3 use the so i provide, not the one installed on the os. i tested this on windows and i noticed that the program maps the dll installed on the system into the address space of the program and calls apis from there but i would like to use my own version of the python3 library or even better have it completely embedded into the binary and have it mapped into memory at runtime and executed from there. do you know how can someone embed the so into the binary? or at least make the binary only look for the so provided? thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Did you have a look at the PyOxidizer project? Maybe this fulfils your needs already? |
Beta Was this translation helpful? Give feedback.
-
hey, i wanted to add a few more details if anyone reads this in the future, so it is possible to link the libpython3.10.a library statically to your binary but then you have a problem with dynamically loaded modules. |
Beta Was this translation helpful? Give feedback.
Did you have a look at the PyOxidizer project? Maybe this fulfils your needs already?