Skip to content
brett hartshorn edited this page Mar 24, 2015 · 3 revisions

A markdown file can contain blocks of Nim code, if you have Nim installed, Rusthon will use it to compile a dynamic library that gets linked to the final c++ exe.

Only Nim functions marked with the pragma {.cdecl, exportc.} will be callable from Rusthon code.

Examples

Syntax

First import nim and call nim.main() at the start of your main function. Nim functions are in the global namespace, you can directly call them. Note strings need to be converted to C-strings, using cstr(s).

Sidebar

Clone this wiki locally