python bindings

This commit is contained in:
Henri Bourcereau 2026-01-10 21:01:35 +01:00
parent 291b0ef3c1
commit fe3bfe47db
11 changed files with 507 additions and 13 deletions

9
bot/pyproject.toml Normal file
View file

@ -0,0 +1,9 @@
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[tool.maturin]
# "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so)
features = ["pyo3/extension-module"]
# python-source = "python"
# module-name = "trictrac.game"

4
bot/python/test.py Normal file
View file

@ -0,0 +1,4 @@
import store
game = store.TricTrac()
print(game.get_state_dict())