Squirrel is a high level imperative, object-oriented programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games. PySquirrel is intended to be a comprehensive binding of Squirrel 3 for Python.
| CI | status |
|---|---|
| MSVC 2022 | |
| pip builds | |
| cibuildwheel |
An project built with pybind11. This requires Python 3.7+; for older versions of Python, check the commit history.
Try squirrel-py directly in the browser with the Pyodide demo:
https://shabbywu.github.io/squirrel-py/
The demo loads a WebAssembly wheel and runs the same SQVM example without a
local Python install.
pip install squirrel-lang
Initialize the vendored native sources first:
git submodule update --init --recursiveThe build uses vcpkg automatically when VCPKG_ROOT is set or vcpkg is on
PATH. Without vcpkg, install the Python build helpers first:
python -m pip install cmake pybind11
python -m pip install .Legacy python setup.py install is also supported for local installs, but
python -m pip install . is the recommended path.
Debug trace macros are disabled by default. Enable them explicitly when needed:
TRACE_CONTAINER_GC=1 TRACE_OBJECT_CAST=1 python -m pip install .from squirrel import SQVM
vm = SQVM()
vm.execute("""
sq <- {
function say () {
return "hello world"
}
}
""")
sq = vm.get_roottable()["sq"]
assert str(sq.say()) == "hello world"