Skip to main content

Module runtime

Module runtime 

Source
Expand description

Detect kernel features at runtime.

This module exposes methods to perform detection of kernel features at runtime. This allows applications to auto-detect whether recent options are implemented by the currently running kernel.

§Example

let ambient = caps::runtime::ambient_set_supported().is_ok();
println!("Supported ambient set: {}", ambient);

let all = caps::runtime::procfs_all_supported(None)
    .unwrap_or_else(|_| caps::runtime::thread_all_supported());
println!("Supported capabilities: {}", all.len());

Functions§

ambient_set_supported
Check whether the running kernel supports the ambient set.
procfs_all_supported
Return the set of all capabilities supported by the running kernel.
thread_all_supported
Return the set of all capabilities supported on the current thread.