#1127324 ITP: pnut -- A Self-Compiling C Transpiler Targeting Human-Readable POSIX Shell

#1127324#5
Date:
2026-02-06 22:12:04 UTC
From:
To:
* Package name    : pnut
  Version         : 1.0
  Upstream Author : Laurent Huberdeau
* URL             : https://github.com/udem-dlteam/pnut
* License         : BSD-2-Clause
  Programming Lang: C, Shell
  Description     : A Self-Compiling C Transpiler Targeting Human-Readable POSIX Shell

 Pnut compiles a reasonably large subset of C99 to human-readable POSIX
 shell scripts. It can be used to generate portable shell scripts without
 having to write shell.

 Its main uses are:

    As a transpiler to write portable shell scripts in C.
    As a way to bootstrap a compiler written in C with an executable version that is still human readable (See reproducible builds).

 Main features:

    No new language to learn -- C code in, shell code out.
    The human-readable shell script is easy to read and understand.
    A runtime library including file I/O and dynamic memory allocations.
    A preprocessor (#include, #ifdef, #if, #define MACRO ..., #define MACRO_F(x) ...).
    Integrates easily with existing shell scripts.

/Simon