Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pfalcon/ullvm_c
Lightweight LLVM C API bindings for Pycopy and other Python implementations
https://github.com/pfalcon/ullvm_c
llvm llvmlite pycopy
Last synced: 4 months ago
JSON representation
Lightweight LLVM C API bindings for Pycopy and other Python implementations
- Host: GitHub
- URL: https://github.com/pfalcon/ullvm_c
- Owner: pfalcon
- License: mit
- Created: 2019-02-17T23:09:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-21T21:09:22.000Z (about 4 years ago)
- Last Synced: 2024-09-30T10:41:32.749Z (4 months ago)
- Topics: llvm, llvmlite, pycopy
- Language: Python
- Homepage: https://github.com/pfalcon/pycopy
- Size: 47.9 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ullvm_c
=======This is a project to wrap LLVM C API using a Pycopy's
[ffi](https://pycopy.readthedocs.io/en/latest/library/ffi.html) module,
thus producing pure-Python bindings to a sufficiently large subset of LLVM
functionality. [Pycopy](https://github.com/pfalcon/pycopy) is a minimalist
implementation of the Python language. Pycopy's `ffi` module was also
[ported to CPython](https://github.com/pfalcon/pycopy-lib/tree/master/cpython-ffi),
so `ullvm_c` is compatible with CPython too (or any other Python
implementation which provides `ctypes` module).Two examples are included, JIT-generating a simple function, using both
older MCJIT, and newer ORC LLVM JIT engines:```
pycopy example_mcjit.py
pycopy example_orcjit.py
```Using with CPython
------------------To using with CPython, you would need to install Pycopy compatibility
modules for CPython:```
pip3 install -r requirements-cpython.txt
```Afterwards, you can run the samples in the same way as with Pycopy:
```
python3 example_mcjit.py
python3 example_orcjit.py
```Licensing and copyright
-----------------------Copyright (c) 2019 Paul Sokolovsky. Released under the terms of MIT license.