Mac and native C++ assemblies

I would like to ask about making grasshopper add-ons for mac users.
Since I do not have such computer/operating system, I would like to ask what are the main issues?

Is Rhino for Mac is 64 bit or 32 bit?
From users I know that native C++ 64 bit .dll does not work on mac.
Would it even work if I compile C++ .dll to 32 bit?

Rhino is 64-bit on both Windows and Mac.

Native C++ libraries can work, but they won’t straight from Windows compiled. You’ll have to make an effort in ensuring your code compiles cross-platform. Depending on what you are doing it is either straightforward, or less so.

After that you’ll have to do P/Invoke just like on Windows - it will just be differently set up.

RhinoCycles / Raytraced works like this. The Cycles engine and its wrapper are compiled as a single shared library (DLL on Windows, .so on Mac), and they are accessed through P/Invoke on the Mac just the same.

For instance the camera functions from the shared library are P/Invoked like this: https://github.com/mcneel/CCSycles/blob/rhino-6.x/csycles/CSycles.Camera.cs

For your C/C++ code just take care you write it cross-platform.

And before you ask - yes, the Cycles library is also used in Grasshopper through the GhShaderNodes plug-in.

Hi @Petras_Vestartas,

It might be worth yoru time to review the following guide.

– Dale

Thank you for a reply Dale and Nathan:)