Skip to content

Commit 3dd58b3

Browse files
authored
Switch 'deny' lints to 'warn' to simplify local development. Warnings will be caught by clippy regardless in CI (#679)
Signed-off-by: Ludvig Liljenberg <[email protected]>
1 parent 5560b9c commit 3dd58b3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/hyperlight_host/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
#![deny(dead_code, missing_docs, unused_mut)]
16+
#![warn(dead_code, missing_docs, unused_mut)]
1717
//! This crate contains an SDK that is used to execute specially-
1818
// compiled binaries within a very lightweight hypervisor environment.
1919

src/hyperlight_host/src/sandbox/hypervisor.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,9 @@ pub(crate) enum HypervisorType {
7777
#[cfg(target_os = "windows")]
7878
Whp,
7979
}
80+
81+
// Compiler error if no hypervisor type is available
82+
#[cfg(not(any(kvm, mshv, target_os = "windows")))]
83+
compile_error!(
84+
"No hypervisor type is available for the current platform. Please enable either the `kvm` or `mshv` cargo feature."
85+
);

0 commit comments

Comments
 (0)