Genny – Generate Nim library bindings for many languages

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

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
  1. genny

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

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. 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

  4. nimterop

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

    https://github.com/nimterop/nimterop

  5. 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"

  6. Biohazrd

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

    https://github.com/InfectedLibraries/Biohazrd

  7. 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

  • nimpylib VS pylib - a user suggested alternative

    2 projects | 20 Apr 2025
  • Show HN: HTML visualization of a PDF file's internal structure

    5 projects | news.ycombinator.com | 10 Feb 2025
  • Bython: Python with braces. Because Python is awesome, but whitespace is awful

    3 projects | news.ycombinator.com | 11 Mar 2024
  • Nitter Shutting Down

    6 projects | news.ycombinator.com | 27 Jan 2024
  • C23: A Slightly Better C

    2 projects | news.ycombinator.com | 21 Jan 2024