Maui apps can call c/c++ via the p/invoke library:
https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke
the main task is to define the entry points and mapping (marshalling) of the parameters. you usually use .h file to determine how to do this. Calling native libraries is common enough with Maui, there is support for binding libraries (generated wrappers):