#python-bindings #python #bindings #portable #ffi

sys pocketpy-sys

Rust FFI bindings to pocketpy, a portable python 3.x interpreter

1 unstable release

0.1.0 Aug 29, 2024

#2081 in Parser implementations

MIT license

1MB
20K SLoC

C 12K SLoC // 0.0% comments Python 5.5K SLoC // 0.1% comments JavaScript 1.5K SLoC // 0.0% comments Lua 148 SLoC // 0.0% comments C++ 146 SLoC Shell 91 SLoC // 0.0% comments Rust 79 SLoC // 0.1% comments

Pocketpy Rust FFI Bindings

Pocketpy is a portable python 3.x interpreter written in C11. These are low-level Rust bindings to Pocketpy. I may make higher level bindings in the future.

The one issue I've been having is that most linkers can't link pocketpy's static library if it is compiled with IPO (interprocedural optimizations), which will obviously result in a drop of performance. I've seen other people have the same kind of issues while linking C code to Rust code, but I'm not aware of any solution. If you think of something, feel free to make an issue/pr.

No runtime deps

~0–2.2MB
~44K SLoC