Skip to content

Commit 47c4d0d

Browse files
fix docs/name
1 parent 6936575 commit 47c4d0d

File tree

2 files changed

+43
-42
lines changed

2 files changed

+43
-42
lines changed

docs-src/dynamic.rst

Lines changed: 0 additions & 42 deletions
This file was deleted.

docs-src/dynamic.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../dynamic/README.rst

dynamic/README.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
raylib.dynamic
2+
==============
3+
4+
CFFI ABI dynamic bindings avoid the need to compile a C extension module. They now been moved to a separate module::
5+
6+
python3 -m pip install raylib_dynamic
7+
8+
.. warning::
9+
10+
There have been some weird failures with dynamic bindings and ctypes bindings before and often the
11+
failures are silent
12+
so you dont even know. Also the static bindings are faster. Therefore I personally recommend the static ones.
13+
But the dynamic bindings have the advantage that you don't need to compile anything to install. You just need a Raylib DLL.
14+
15+
API is exactly the same as the static one documented here. (Therefore you can't have both modules installed at once.) The only difference is you can't do::
16+
17+
from raylib import *
18+
19+
Instead you have to do::
20+
21+
from raylib import raylib as rl
22+
23+
Then you access the functions with ``rl.`` prefix. See
24+
25+
See https://github.com/electronstudio/raylib-python-cffi/blob/master/dynamic/test_dynamic.py for an example.
26+
27+
28+
29+
.. important::
30+
31+
If your system already has the Raylib library installed, you can set the environment variable ``USE_EXTERNAL_RAYLIB`` and it will
32+
always be used instead of the bundled DLLs.
33+
34+
35+
36+
.. note::
37+
38+
If you write a program using the ``rl.`` prefix on all the functions and then you decide you want to use
39+
that same program with the static binding instead of the dynamic, you don't have to remove the ``rl``,
40+
you can just do::
41+
42+
import raylib as rl

0 commit comments

Comments
 (0)