Skip to main content

openvmm_hcl/
main.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//! Root binary crate for builds of OpenVMM-HCL.
5
6#![forbid(unsafe_code)]
7
8// Link resources.
9#[cfg(target_os = "linux")]
10use openvmm_hcl_resources as _;
11
12// OpenVMM-HCL only needs libcrypto from openssl, not libssl.
13#[cfg(target_os = "linux")]
14openssl_crypto_only::openssl_crypto_only!();
15
16#[cfg(all(not(test), target_os = "linux"))]
17crypto::ensure_single_backend!();
18
19#[cfg(not(target_os = "linux"))]
20fn main() {
21    unimplemented!("openvmm_hcl only runs on Linux");
22}
23
24#[cfg(target_os = "linux")]
25use underhill_entry::underhill_main as main;