Create developer_guide.md

...
This commit is contained in:
blueloveTH 2023-04-24 20:35:42 +08:00
parent 547c55ce92
commit 94c17ac0b7
3 changed files with 44 additions and 2 deletions

View File

@ -13,7 +13,7 @@
pkpy is a lightweight(~8000 LOC) Python interpreter for game engine/apps, built on C++17 with STL. pkpy is a lightweight(~8000 LOC) Python interpreter for game engine/apps, built on C++17 with STL.
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. It is extremely easy to embed. Including a compiler and a 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](https://pocketpy.dev/static/web/). Please see https://pocketpy.dev for details or try [Live Demo](https://pocketpy.dev/static/web/).

42
docs/developer_guide.md Normal file
View File

@ -0,0 +1,42 @@
---
icon: book
order: 2
label: Developer guide
---
There are some scripts to help you develop this project.
## Build scripts
`build.py` is the main script to build the project.
```bash
# equivalent to `python build.py linux`
python build.py
# build for linux executable or `.so` library
python build.py linux [-lib]
# build for windows executable or `.dll` library
python build.py windows [-lib]
# build for web (wasm)
python build.py web
```
## Test scripts
```bash
# run unit tests
python scripts/run_tests.py
# run benchmarks
python scripts/run_tests.py benchmarks/
```
## Distribution scripts
```bash
python amalgamate.py
```
It will generate a single `pocketpy.h` and `main.cpp` in `amalgamate/` directory.

View File

@ -7,7 +7,7 @@ label: Welcome
pkpy is a lightweight(~8000 LOC) Python interpreter for game engine/apps. pkpy is a lightweight(~8000 LOC) Python interpreter for game engine/apps.
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. It is extremely easy to embed. Including a compiler and a bytecode virtual machine. All of them are available in a single header file `pocketpy.h`, without external dependencies.
## What it looks like ## What it looks like