Skip to content

wideopensource/crelm

Repository files navigation

Crelm

The Crelm package provides a relatively simple API around the CFFI system. Give it C code or source files, it gives you a package with bindings to functions and structs. Easiest way to get started is hack up the examples in the repo.

Installation

pip3 install crelm

Simple Demo

from crelm import Factory

paste = Factory(debug=False, verbose=True).create_Tube('add2') \
    .add_source_text('int add2(int a, int b) { return a + b; }') \
    .squeeze()

print(f'2 + 3 = {paste.add2(2, 3)}')

About

Python package which enables embedding C code directly into Python source. pip install crelm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published