Rust for Zemax DLLs

  • 20 March 2024
  • 0 replies

Hi, I used Rust to build a very simple DLL, inspired by the examples in C and C++ provided with Zemax. The source code can be found here. I compiled it from Windows and a Unix machine with cross compiling. Both versions were as fast as the C alternative I wrote. The compilation method is pretty straightforward and documented in the repo README.

It was quite easy to implement similar workflows and structures for some of the other types of DLLs used in Zemax.

Yet, I would like to do the same with the 2D version of the diffraction grating. I could only find mentions to the 1D grating in the Zemax docs. The provided code sample covers only a portion of the elements of the pointer and not all of them are fully documented. Does anyone have that piece of information?

0 replies

Be the first to reply!