From 94c17ac0b78f6add78bf39e83534cbdea77e1cb1 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 24 Apr 2023 20:35:42 +0800 Subject: [PATCH] Create developer_guide.md ... --- README.md | 2 +- docs/developer_guide.md | 42 +++++++++++++++++++++++++++++++++++++++++ docs/index.md | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 docs/developer_guide.md diff --git a/README.md b/README.md index c9b11d87..4fab0106 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ 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/). diff --git a/docs/developer_guide.md b/docs/developer_guide.md new file mode 100644 index 00000000..1cedc783 --- /dev/null +++ b/docs/developer_guide.md @@ -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. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index a6955be2..4edd2587 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,7 +7,7 @@ label: Welcome 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