Submit Search
Upload
Call C APIs from Python easily with CFFI
•
0 likes
•
890 views
AI-enhanced title
Pôle Systematic Paris-Region
Follow
PyParis 2017 http://pyparis.org
Read less
Read more
Technology
Report
Share
Report
Share
1 of 45
Download now
Download to read offline
Recommended
Call a C API from Python becomes more enjoyable with CFFI
Call a C API from Python becomes more enjoyable with CFFI
LINAGORA
Cython - close to metal Python
Cython - close to metal Python
Taras Lyapun
Cling the llvm based interpreter
Cling the llvm based interpreter
Roberto Nogueira
Cython compiler
Cython compiler
Tanikella Sai Abhijyan
Mypy pycon-fi-2012
Mypy pycon-fi-2012
jukkaleh
Brief Introduction to Cython
Brief Introduction to Cython
Aleksandar Jelenak
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
Pôle Systematic Paris-Region
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
Pôle Systematic Paris-Region
Recommended
Call a C API from Python becomes more enjoyable with CFFI
Call a C API from Python becomes more enjoyable with CFFI
LINAGORA
Cython - close to metal Python
Cython - close to metal Python
Taras Lyapun
Cling the llvm based interpreter
Cling the llvm based interpreter
Roberto Nogueira
Cython compiler
Cython compiler
Tanikella Sai Abhijyan
Mypy pycon-fi-2012
Mypy pycon-fi-2012
jukkaleh
Brief Introduction to Cython
Brief Introduction to Cython
Aleksandar Jelenak
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
Pôle Systematic Paris-Region
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
Pôle Systematic Paris-Region
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
Pôle Systematic Paris-Region
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
Pôle Systematic Paris-Region
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
Pôle Systematic Paris-Region
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
Pôle Systematic Paris-Region
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
Pôle Systematic Paris-Region
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Pôle Systematic Paris-Region
Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Pas de commun sans communauté ?
Pôle Systematic Paris-Region
Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Projet Wolphin
Pôle Systematic Paris-Region
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Pôle Systematic Paris-Region
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Pôle Systematic Paris-Region
Osis18_Cloud : Software-heritage
Osis18_Cloud : Software-heritage
Pôle Systematic Paris-Region
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
Pôle Systematic Paris-Region
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
Pôle Systematic Paris-Region
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
Pôle Systematic Paris-Region
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
Pôle Systematic Paris-Region
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
Pôle Systematic Paris-Region
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
Pôle Systematic Paris-Region
PyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelat
Pôle Systematic Paris-Region
PyParis2017 / Python pour les enseignants des classes préparatoires, by Olivi...
PyParis2017 / Python pour les enseignants des classes préparatoires, by Olivi...
Pôle Systematic Paris-Region
PyParis 2017 / Unicode and bytes demystified, by Boris Feld
PyParis 2017 / Unicode and bytes demystified, by Boris Feld
Pôle Systematic Paris-Region
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
More Related Content
More from Pôle Systematic Paris-Region
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
Pôle Systematic Paris-Region
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
Pôle Systematic Paris-Region
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
Pôle Systematic Paris-Region
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
Pôle Systematic Paris-Region
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
Pôle Systematic Paris-Region
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Pôle Systematic Paris-Region
Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Pas de commun sans communauté ?
Pôle Systematic Paris-Region
Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Projet Wolphin
Pôle Systematic Paris-Region
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Pôle Systematic Paris-Region
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Pôle Systematic Paris-Region
Osis18_Cloud : Software-heritage
Osis18_Cloud : Software-heritage
Pôle Systematic Paris-Region
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
Pôle Systematic Paris-Region
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
Pôle Systematic Paris-Region
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
Pôle Systematic Paris-Region
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
Pôle Systematic Paris-Region
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
Pôle Systematic Paris-Region
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
Pôle Systematic Paris-Region
PyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelat
Pôle Systematic Paris-Region
PyParis2017 / Python pour les enseignants des classes préparatoires, by Olivi...
PyParis2017 / Python pour les enseignants des classes préparatoires, by Olivi...
Pôle Systematic Paris-Region
PyParis 2017 / Unicode and bytes demystified, by Boris Feld
PyParis 2017 / Unicode and bytes demystified, by Boris Feld
Pôle Systematic Paris-Region
More from Pôle Systematic Paris-Region
(20)
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : Software-heritage
Osis18_Cloud : Software-heritage
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
PyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelat
PyParis2017 / Python pour les enseignants des classes préparatoires, by Olivi...
PyParis2017 / Python pour les enseignants des classes préparatoires, by Olivi...
PyParis 2017 / Unicode and bytes demystified, by Boris Feld
PyParis 2017 / Unicode and bytes demystified, by Boris Feld
Recently uploaded
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Roshan Dwivedi
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
gurkirankumar98700
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
Recently uploaded
(20)
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Call C APIs from Python easily with CFFI
1.
CALL A C API FROM PYTHON BECOMES MORE ENJOYABLE WITH CFFI JEAN-SÉBASTIEN BEVILACQUA
2.
WHY PYTHON EXTENSION ?
3.
WHY PYTHON EXTENSION ? ACCESSING LOW-LEVEL API OPENGL / VULKAN
4.
WHY PYTHON EXTENSION ? LINKING TO EXISTING C LIBRARY
5.
WHY PYTHON EXTENSION ? IMPROVING PERFORMANCE
6.
OUR GOOD FRIEND IS ALWAYS HERE !
7.
I'M TOTALLY LOST WITH CPYTHON API
8.
APPLICATION PROGRAMMING INTERFACE APPLICATION BINARY INTERFACE
9.
WHY ABI ?
10.
CYTHON
11.
CYTHON INCREMENTAL OPTIMIZATION PY++
12.
CYTHON def fib(int n): cdef int a = 0 cdef int b = 1 while b < n: print(b) a, b = b, a + b
13.
CYTHON ABI / API
14.
CTYPES BUILT-IN / ABI ONLY
15.
CTYPES from ctypes import cdll, Structure, c_int, c_double lib = cdll.LoadLibrary('./vector.so') # ctypes Point structure class Point(Structure): _fields_ = [('x', c_int), ('y', c_int)] # Initialize Point[2] argument points_array = (Point * 2)((1, 2), (3, 4)) # Get vector_size from library vector_size_fn = lib.vector_size vector_size_fn.restype = c_double # Call vector_size with ctypes size = vector_size_fn(points_array) print('out = {}'.format(size))
16.
CFFI ENLIGHTENED IN-LINE : IMPORT TIME OUT-OF-LINE : INSTALL TIME
17.
ABI / IN-LINE from cffi import FFI ffi = FFI() ffi.cdef("int printf(const char *format, ...);") C = ffi.dlopen(None) arg = ffi.new("char[]", "world") C.printf("hello %sn", arg)
18.
ABI / IN-LINE DEMO
19.
API / OUT-OF-LINE from cffi import FFI ffibuilder = FFI() ffibuilder.set_source("_example", r"""#include <sys/types.h> #include <pwd.h> """) ffibuilder.cdef(""" struct passwd { char *pw_name; ...; }; struct passwd *getpwuid(int uid); """) if __name__ == "__main__": ffibuilder.compile(verbose=True)
20.
API / OUT-OF-LINE RUNNING
21.
REBUILD
22.
STATISTICS VULKAN API C HEADER : 5088 LOC XML DESCRIPTION : 6461 LOC
23.
STATISTICS C WRAPPER GENERATED C FILE : 62705 LOC GENERATOR : 1057 PY-LOC / 1141 C-LOC
24.
STATISTICS CFFI WRAPPER GENERATED PYTHON FILE : 4859 LOC GENERATOR : 692 PY-LOC
25.
HOW IT WORKS ?
26.
JINJA2 TEMPLATE
27.
JINJA2 TEMPLATEC EXTENSION ├── converters.c -> 423 ├── custom_functions.c -> 103 ├── custom_structs.c -> 59 ├── extension_functions.c -> 32 ├── functions.c -> 8 ├── header.c -> 11 ├── init.c -> 68 ├── init_unions │ ├── vkclearcolorvalue.c -> 69 │ └── vkclearvalue.c -> 36 ├── macros.c -> 111 ├── main.c -> 122 ├── objects.c -> 99 └── jfilter.py -> 542 Total: 1683
28.
JINJA2 TEMPLATE CFFI EXTENSION ONLY ONE SMALL FILE vulkan.template.py -> 340
29.
SHOW ME THE CODE !
30.
CONSTANTS C EXTENSION CFFI EXTENSION PyModule_AddIntConstant(module, {{name}}, {{value}}); {{name}} = {{value}}
31.
OBJECTS
32.
OBJECTS C EXTENSION NEW (MALLOC) DEL (FREE) INIT GET (FOR EACH MEMBER)
33.
OBJECTS CFFI EXTENSION def _new(ctype, **kwargs): _type = ffi.typeof(ctype) ptrs = {} for k, v in kwargs.items(): # convert tuple pair to dict ktype = dict(_type.fields)[k].type if ktype.kind == 'pointer': ptrs[k] = _cast_ptr(v, ktype) init = dict(kwargs, **{k: v for k, (v, _) in ptrs.items()}) return ffi.new(_type.cname + '*', init)[0]
34.
FAST API MODE
35.
SHADERC WRAPPER
36.
FOLDER DESIGN ├── _cffi_build │ ├── pyshaderc_build.py │ └── shaderc.h ├── pyshaderc │ └── __init__.py └── setup.py
37.
DEFINITION ffi = FFI() with open('shaderc.h') as f: ffi.cdef(f.read())
38.
BUILDING ffi = FFI() with open('shaderc.h') as f: source = f.read() ffi.set_source('_pyshaderc', source, libraries=['shaderc_combined']) if __name__ == '__main__': ffi.compile()
39.
USE
40.
USE from pyshaderc._pyshaderc import ffi, lib
41.
USE def compile_into_spirv(raw, stage, suppress_warnings=False): # initialize compiler compiler = lib.shaderc_compiler_initialize() # compile result = lib.shaderc_compile_into_spv(compiler, raw, len(raw), stage, b"main")
42.
USE length = lib.shaderc_result_get_length(result) output_pointer = lib.shaderc_result_get_bytes(result) tmp = bytearray(length) ffi.memmove(tmp, output_pointer, length) spirv = bytes(tmp) return spirv
43.
SETUPTOOLS INTEGRATION setup( ... cffi_modules=["_cffi_build/pyshaderc_build.py:ffi"] )
44.
DEMO TIME !
45.
GIVE A TRY TO CFFI ! @REALITIX LINAGORA.COM
Download now