Ei kuvausta

blueloveTH 071243b9d9 Update README.md 3 vuotta sitten
.github 25ab9e3a0f Update main.yml 3 vuotta sitten
docs 24b2140959 update readme 3 vuotta sitten
plugins 8d16b1b4f2 up 3 vuotta sitten
scripts c6c2b04b3e up 3 vuotta sitten
src 4b22c10a5c up 3 vuotta sitten
tests 645320eb2f add tuple slice 3 vuotta sitten
web 7ad0ed1e2e remove threaded vm 3 vuotta sitten
.gitattributes 0891000a46 init 3 vuotta sitten
.gitignore 4ccb124eec Update .gitignore 3 vuotta sitten
.gitmodules b247723b80 up 3 vuotta sitten
LICENSE ea3fc010f3 change license 3 vuotta sitten
README.md 071243b9d9 Update README.md 3 vuotta sitten
amalgamate.py ea3fc010f3 change license 3 vuotta sitten
build_cpp.sh 7ad0ed1e2e remove threaded vm 3 vuotta sitten
build_wasm.sh 7909f00e50 up 3 vuotta sitten
test_cpp.sh 85bbdeaf9c up 3 vuotta sitten

README.md

pocketpy

PocketPy is a lightweight(~5000 LOC) Python interpreter for game engines.

It is extremely easy to embed. Including a compiler, optimizer and bytecode virtual machine. All of them are available in a single header file pocketpy.h, without external dependencies.

Please see https://pocketpy.dev for details or try Live Demo.

sample_img

News

PocketPy is undergoing a major reconstruction. The next version, 0.8.x, is a huge break change compared with 0.6.x.

Changes in 0.8.x:

  1. better way for C bindings/host bindings
  2. try/catch support
  3. yield/coroutine support (we will try to implement asyncio)
  4. complete reflection (exec/eval/getattr/setattr/hasattr)
  5. bytecode optimizer (will improve the performance by 2x-3x)

Since the main purpose of PocketPy is for game engines, which is usually single-threaded. We will change some designs to fit this situation. All threaded interfaces will be deleted. PocketPy will no longer provide thread support at the C language level. If one needs to run the virtual machine in a thread, we recommend to use the thread support provided by the host language.

Reference