Genny – Generate Nim library bindings for many languages

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
  • genny

    Generate a shared library and bindings for many languages. (by treeform)

  • c2nim

    c2nim is a tool to translate Ansi C code to Nim. The output is human-readable Nim code that is meant to be tweaked by hand before and after the translation process.

    Now if only a full binding generator for C and C++ headers to Nim was done, the language would really be cooking!

    "What do you mean, Nim has two of these already?"

    Yeah, I know, and -- not to hurt anyone's feelings -- but: they kind of suck. And there's no way I see them able to be extended to do the job fully, based on the way they're currently built.

    Those are some bold claims to make!

    So before I get stoned to death (no offense to the authors, I am grateful that they exist and have used them both) let me attempt an explanation and back up these statements.

    ---

    To start off, the two tools available are "c2nim" and "nimterop". c2nim is a Nim official library, while nimterop is a community library.

      https://github.com/nim-lang/c2nim

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • nimterop

    Nimterop is a Nim package that aims to make C/C++ interop seamless

    https://github.com/nimterop/nimterop

  • ClangSharp

    Clang bindings for .NET written in C#

    I've found this to be true, with the exception that a few people have taken to "augmenting" libclang with extra bindings to libTooling functions or other C++-only methods.

    Most notably is Tanner Gooding & Co's "libClangSharp" from the Microsoft "ClangSharp" project, and PathogenDavid's "Biohazrd" libraries (which again are a sort of enhanced fork based on ClangSharp):

      https://github.com/microsoft/ClangSharp  # See "/sources/libClangSharp"

  • Biohazrd

    A framework for automatically generating binding wrappers for C/C++ libraries

    https://github.com/InfectedLibraries/Biohazrd

  • nimporter

    Compile Nim Extensions for Python On Import!

    For the specific case of Python executing Nim code you might be interested in [nimporter](https://github.com/Pebaz/nimporter) instead. Genny would definitely work for you as well, but it seems to be more geared towards creating libraries in Nim that can be imported by multiple languages.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts