You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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).