Hi tdpar...,
The Rust code must first be complied to a system dynamic library
--crate-type=cdylib, #![crate_type = "cdylib"] - A dynamic system library will be produced. This is used when compiling a dynamic library to be loaded from another language. This output type will create *.so files on Linux, *.dylib files on macOS, and *.dll files on Windows.
The Rust code is actually loaded dynamically into memory by Orthanc via the plugin architecture.
The Rust plugin only needs to be compiled with a C runtime version that matches the same C runtime version used by the Orthanc installation.
For example on an ubuntu machine:
ldd --version
ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
On an Arch Linux machine:
ldd --version
ldd (GNU libc) 2.36
kind regards,
Andrew