replit / prybar

Pry open those interpreters.
GNU General Public License v2.0
253 stars 52 forks source link

"statically" link libs and deps into prybar binary #42

Open turbio opened 4 years ago

turbio commented 4 years ago

Right now prybar links with the system's libraries and depends on the system having all the language's dependencies. Python for example requires (ignoring common system libs) /usr/lib/libpython3.8.so, /usr/bin/lib/python3.8/..., and /usr/lib/python3.8/... to be present at runtime. This makes prybar non portable between systems without installing the language's libs at the correct version system wide.

These shared libs come in two forms: shared objects loaded by the elf interpreter and shared resources loaded by the language interpreter. My proposed solution:

There are already some projects out there that'll make embedding pretty easy.

It's a bit unclear where to draw the line on what gets packed into the binary. Putting the language's entire standard library into the binary would make it super portable but perhaps too big.