1 //! This example checks if memory protection keys (MPK) are available on the
2 //! current system using the
3 //! [`PoolingAllocationConfig::are_memory_protection_keys_available`] API.
4 
5 use std::process::exit;
6 use wasmtime::*;
7 
main()8 fn main() {
9     if PoolingAllocationConfig::are_memory_protection_keys_available() {
10         eprintln!("MPK is available");
11         exit(0);
12     } else {
13         eprintln!("MPK is not available");
14         exit(1);
15     }
16 }
17