[How to implement long-lived variables/state in a library?](https://stackoverflow.com/questions/59028838/how-to-implement-long-lived-variables-state-in-a-library)
[Foreign Function Interface - Rustonomicon](https://doc.rust-lang.org/nomicon/ffi.html#foreign-function-interface)