Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/holmanb/c-ffi
Foreign Function Interface (go, c++, etc)
https://github.com/holmanb/c-ffi
c c-plus-plus foreign-function-interface go
Last synced: about 23 hours ago
JSON representation
Foreign Function Interface (go, c++, etc)
- Host: GitHub
- URL: https://github.com/holmanb/c-ffi
- Owner: holmanb
- Created: 2019-07-17T04:15:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-26T21:02:10.000Z (almost 5 years ago)
- Last Synced: 2024-06-19T15:07:16.190Z (5 months ago)
- Topics: c, c-plus-plus, foreign-function-interface, go
- Language: C++
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# c-ffi
## Purpose
The purpose of this project is to gain a better understanding of Foreign Function Interfaces.
Foreign function interfaces are a way for a program in one language to execute code written in another language.## Goal
The goal of this project is to explore the FFI to C in a number of languages. This will ideally achieve multiple
goals: to serve as an example repository for future personal usage, as well as (hopefully) provide some simple
tests in each language to test the performance of the interface.## Methodology
There is a *small* toy library in C called [`set-c`](https://github.com/holmanb/set-c). This library implements
a generic set in C using void pointers. This library will be used in each language to do a small set of operations.The usage of foreign functions in each language should follow typical conventions/coding style of that language.
For example, C++ is an OOP language and `set-c` is not OOP, but easily fits the OOP model. Therefore, a wrapper
class is written in C++.After a few languages are supported, a standard set of tests will be developed to evalute the performance of
the FFI in each language.## Organization
There is a directory for each language. For ease of building the code, a makefile is provided in each one.
Run `make` in the directory to build the binary.