33This uses CFFI API static bindings rather than ctypes. Hopefully this will be faster, the static type knowledge from the C
44headers will result in fewer bugs, and using the original headers will make it easier to maintain.
55
6- Currently the goal is make usage as similar to the original C as CFFI will allow. There are a few differences
7- you can see in the examples. Making a 'Pythonic' library would be an additional layer on top which hasn't been
8- done yet.
9-
10- See test_static.py and examples/* .py for how to use.
11-
12- # Installing
6+ # Install
137
148** MacOS: Python 3.7** : we distribute a statically linked Raylib library, so in theory the only thing you need to do is install
159us from Pypi.
@@ -31,6 +25,31 @@ you will have to build. The specific version we built against is https://github
3125 python3 build_linux.py
3226 python3 build_mac.py
3327
28+ # Use
29+
30+ ## raylib.static
31+
32+ Currently the goal is make usage as similar to the original C as CFFI will allow. There are a few differences
33+ you can see in the examples. See test_static.py and examples/* .py for how to use.
34+
35+ ## raylib.dynamic
36+
37+ In addition to the API static bindings I have attempted to do CFFI ABI dynamic bindings in order to avoid the need to compile a C extension module.
38+ There have been some weird failures with dynamic bindings and ctypes bindings before and often the failures are silent
39+ so you dont even know. Also the static bindings should be faster. Therefore I recommend the static ones...
40+
41+ BUT the dynamic bindings have the big advantage that you don't need to compile anything to install.
42+
43+ See test_dynamic.py for how to use them.
44+
45+ ## raylib.static.pyray
46+
47+ Wrapper around the static bindings. Makes the names snakecase and converts strings to bytes automatically. See test_pyray.py.
48+
49+ ## raylib.richlib
50+
51+ A very easy to use library on top of static bindings, modelled after Pygame Zero.
52+
3453# Platforms tested
3554
3655 * MacOS 10.12.6 - Python 3.7
@@ -42,12 +61,3 @@ you will have to build. The specific version we built against is https://github
4261 * converting more examples from C to python
4362 * testing and building on more platforms
4463
45- ### Dynamic bindings
46-
47- In addition to the API static bindings I have attempted to do CFFI ABI dynamic bindings in order to avoid the need to compile a C extension module.
48- There have been some weird failures with dynamic bindings and ctypes bindings before and often the failures are silent
49- so you dont even know. Also the static bindings should be faster. Therefore I recommend the static ones...
50-
51- BUT the dynamic bindings have the big advantage that you don't need to compile anything to install.
52-
53- See test_dynamic.py for how to use them.
0 commit comments