Skip to main content

Rust for Zemax DLLs


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?

Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings