Feature flag for memfd_secret alloc (#343)

* feature flag for memfd_secret alloc

* Cargo fmt
This commit is contained in:
Prabhpreet Dua
2024-06-11 14:53:30 +05:30
committed by GitHub
parent ac2aaa5fbd
commit f535a31cd7
4 changed files with 15 additions and 2 deletions

View File

@@ -11,7 +11,10 @@ mod key;
#[tokio::main]
async fn main() {
#[cfg(feature = "enable_memfd_alloc")]
policy::secret_policy_try_use_memfd_secrets();
#[cfg(not(feature = "enable_memfd_alloc"))]
policy::secret_policy_use_only_malloc_secrets();
let cli = match Cli::parse(std::env::args().peekable()) {
Ok(cli) => cli,