#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

#1891 in Parser implementations

Download history 47/week @ 2024-08-30 15/week @ 2024-09-13 9/week @ 2024-09-20 5/week @ 2024-09-27 2/week @ 2024-10-04 11/week @ 2024-11-29 44/week @ 2024-12-06 16/week @ 2024-12-13

71 downloads per month

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
~45K SLoC