Skip to content

Instantly share code, notes, and snippets.

View KyrillosWalid's full-sized avatar
🏠
Working from home

Kyrillos Walid Radi KyrillosWalid

🏠
Working from home
View GitHub Profile
@KyrillosWalid
KyrillosWalid / tutorial.md
Last active February 19, 2024 01:53
How to add Nim-lang code to C/C++ code - TUTORIAL

How to add Nim-lang code to C/C++ code


Note 1: This tutorial is for Linux users only, but if you understand the idea, you can use it on all systems and it will work as required :).
Note 2: Nim-lang version used in this tutorial is 1.0.4 (To get Nim-lang version nim -v)

To add Nim-lang code to C/C++ code you have 3 choices :

  • Compile Nim-lang code as a (C/C++ header File). THIS IS WHAT WE WILL TAKE TODAY.
  • Compile Nim-lang code as a (C/C++ static library).
  • Compile Nim-lang code as a (C/C++ dynamic library).