nimish

C macro for Nim.

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License Apache-2.0
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:24

Tags

Installation

nimble install nimish
choosenim install nimish
git clone https://github.com/ringabout/nimish

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
nimish - - - - - - -

Source

Repository https://github.com/ringabout/nimish
Homepage https://github.com/ringabout/nimish
Registry Source nimble_official

README

nimish

Make Nim support C macro for fun!

Usage

translate single file

nimish example.nish

translate all files(must be with the extension ".nish")

nimish --all
nimish -a

Run as Nim file

You can pass the same parameters as normal Nim's file, make sure filename is at the end of the parameters list.

nimish c -r example.nish

Example

example.nish

#define text 12
#define name "string"
#define Add(a, b) a + b


proc hello(a: int) =
  echo "Hello, World!"
  echo text
  echo Add(3, 4)
  echo name

Type nimish example.nim.c ->

example.nim

# 1 "example.nim.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "example.nim.c"



proc hello(a: int) =
  echo "Hello, World!"
  echo 12
  echo 3 + 4
  echo "string"