C FFI

Open-source C projects categorized as FFI

Top 15 C FFI Projects

  • core

    MetaCall: The ultimate polyglot programming experience. (by metacall)

  • Project mention: Show HN: Pip Imports in Deno | news.ycombinator.com | 2023-08-11

    An alternative is metacall. The example in the readme is about calling Python from Javascript, but it also works with other languages, like Ruby, C#, Java, and other languages

    https://github.com/metacall/core

    List of supported languages here https://github.com/metacall/core/blob/develop/docs/README.md...

    In the future, maybe webidl (or extensions of it) will bring interoperability between languages too. At the moment there is https://mozilla.github.io/uniffi-rs/ for interoperability between Rust and a number of languages (basically the ones mozilla needs: Swift, Kotlin, Javascript)

  • dart_native

    Write iOS&macOS&Android Code using Dart. This package liberates you from redundant glue code and low performance of Flutter Channel.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • ffi-overhead

    comparing the c ffi (foreign function interface) overhead on various programming languages

  • Project mention: Can Fortran survive another 15 years? | news.ycombinator.com | 2023-05-01

    What about the other benchmarks on the same site? https://docs.sciml.ai/SciMLBenchmarksOutput/stable/Bio/BCR/ BCR takes about a hundred seconds and is pretty indicative of systems biological models, coming from 1122 ODEs with 24388 terms that describe a stiff chemical reaction network modeling the BCR signaling network from Barua et al. Or the discrete diffusion models https://docs.sciml.ai/SciMLBenchmarksOutput/stable/Jumps/Dif... which are the justification behind the claims in https://www.biorxiv.org/content/10.1101/2022.07.30.502135v1 that the O(1) scaling methods scale better than O(log n) scaling for large enough models? I mean.

    > If you use special routines (BLAS/LAPACK, ...), use them everywhere as the respective community does.

    It tests with and with BLAS/LAPACK (which isn't always helpful, which of course you'd see from the benchmarks if you read them). One of the key differences of course though is that there are some pure Julia tools like https://github.com/JuliaLinearAlgebra/RecursiveFactorization... which outperform the respective OpenBLAS/MKL equivalent in many scenarios, and that's one noted factor for the performance boost (and is not trivial to wrap into the interface of the other solvers, so it's not done). There are other benchmarks showing that it's not apples to apples and is instead conservative in many cases, for example https://github.com/SciML/SciPyDiffEq.jl#measuring-overhead showing the SciPyDiffEq handling with the Julia JIT optimizations gives a lower overhead than direct SciPy+Numba, so we use the lower overhead numbers in https://docs.sciml.ai/SciMLBenchmarksOutput/stable/MultiLang....

    > you must compile/write whole programs in each of the respective languages to enable full compiler/interpreter optimizations

    You do realize that a .so has lower overhead to call from a JIT compiled language than from a static compiled language like C because you can optimize away some of the bindings at the runtime right? https://github.com/dyu/ffi-overhead is a measurement of that, and you see LuaJIT and Julia as faster than C and Fortran here. This shouldn't be surprising because it's pretty clear how that works?

    I mean yes, someone can always ask for more benchmarks, but now we have a site that's auto updating tons and tons of ODE benchmarks with ODE systems ranging from size 2 to the thousands, with as many things as we can wrap in as many scenarios as we can wrap. And we don't even "win" all of our benchmarks because unlike for you, these benchmarks aren't for winning but for tracking development (somehow for Hacker News folks they ignore the utility part and go straight to language wars...).

    If you have a concrete change you think can improve the benchmarks, then please share it at https://github.com/SciML/SciMLBenchmarks.jl. We'll be happy to make and maintain another.

  • hlua

    Rust library to interface with Lua

  • rust-lua53

    Lua 5.3 bindings for Rust

  • lua-resty-ffi

    lua-resty-ffi provides an efficient and generic API to do hybrid programming in openresty/envoy with mainstream languages (Go, Python, Java, Rust, Nodejs, etc.).

  • td_rlua

    Zero-cost high-level lua 5.3 wrapper for Rust

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • python-c-io_uring-example

    Using io_uring Linux Kernel interface from Python by JITing C code with MetaCall.

  • php-iup

    php binding for IUP toolkit

  • gtk

    php ffi gtk (by ghostjat)

  • bindings-levmar

    Low level Haskell bindings to the C levmar (Levenberg-Marquardt) library

  • php_opencv

    php-ffi experiment php-opencv

  • bindings-sc3

    Haskell bindings to the SuperCollider synthesis engine

  • Affix.pm

    A Foreign Function Interface eXtension for Perl

  • heatshrink

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

C FFI related posts

Index

What are some of the best open-source FFI projects in C? This list will help you:

Project Stars
1 core 1,492
2 dart_native 938
3 ffi-overhead 639
4 hlua 496
5 rust-lua53 157
6 lua-resty-ffi 81
7 td_rlua 53
8 python-c-io_uring-example 25
9 php-iup 22
10 gtk 9
11 bindings-levmar 2
12 php_opencv 2
13 bindings-sc3 1
14 Affix.pm 0
15 heatshrink 0

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com