Returns the major version of the FFI implementation. If the API evolves, we use the major version to identify compatibility over the unsafe boundary. This call is intended to be used by implementers to validate they have compatible libraries.
()
| 60 | /// boundary. This call is intended to be used by implementers to validate |
| 61 | /// they have compatible libraries. |
| 62 | pub extern "C" fn version() -> u64 { |
| 63 | let version_str = env!("CARGO_PKG_VERSION"); |
| 64 | let version = semver::Version::parse(version_str).expect("Invalid version string"); |
| 65 | version.major |
| 66 | } |
| 67 | |
| 68 | static LIBRARY_MARKER: u8 = 0; |
| 69 |
no outgoing calls
searching dependent graphs…