File tree Expand file tree Collapse file tree 20 files changed +36
-22
lines changed
vmm_tests/vmm_tests/tests Expand file tree Collapse file tree 20 files changed +36
-22
lines changed Original file line number Diff line number Diff line change 33
44//! Flowey pipelines used by the OpenVMM project
55
6+ #![ forbid( unsafe_code) ]
7+
68fn main ( ) {
79 flowey_cli:: flowey_main :: < flowey_hvlite:: pipelines:: OpenvmmPipelines > (
810 "flowey_hvlite" ,
Original file line number Diff line number Diff line change 33
44//! Interactive CLI for Hyper-V VMs.
55
6+ #![ forbid( unsafe_code) ]
7+
68mod windows;
79
810#[ cfg( windows) ]
Original file line number Diff line number Diff line change 55//! guarantees.
66
77#![ expect( missing_docs) ]
8+ #![ forbid( unsafe_code) ]
89
910mod completions;
1011
Original file line number Diff line number Diff line change 33
44//! Root binary crate for builds of OpenVMM-HCL.
55
6+ #![ forbid( unsafe_code) ]
7+
68// Link resources.
79#[ cfg( target_os = "linux" ) ]
810use openvmm_hcl_resources as _;
Original file line number Diff line number Diff line change 33
44//! Root binary crate for OpenVMM.
55
6+ #![ forbid( unsafe_code) ]
7+
68// Ensure openvmm_resources gets linked.
79extern crate openvmm_resources as _;
810
Original file line number Diff line number Diff line change 33
44//! Tool for using petri functionality from the command line.
55
6+ #![ forbid( unsafe_code) ]
7+
68use anyhow:: Context as _;
79use clap:: Parser ;
810use petri:: ArtifactResolver ;
Original file line number Diff line number Diff line change 33
44//! The main pipette agent, which is run when the process starts.
55
6- #![ cfg( any( target_os = "linux" , target_os = "windows" ) ) ]
7-
86use anyhow:: Context ;
97use futures:: future:: FutureExt ;
108use futures_concurrency:: future:: RaceOk ;
Original file line number Diff line number Diff line change 33
44//! Handler for the execute request.
55
6- #![ cfg( any( target_os = "linux" , target_os = "windows" ) ) ]
7-
86use futures:: executor:: block_on;
97use futures:: io:: AllowStdIo ;
108use std:: process:: Stdio ;
Original file line number Diff line number Diff line change 44//! This is the petri pipette agent, which runs on the guest and executes
55//! commands and other requests from the host.
66
7+ #![ cfg_attr( not( windows) , forbid( unsafe_code) ) ]
8+
9+ #[ cfg( any( target_os = "linux" , windows) ) ]
710mod agent;
11+ #[ cfg( any( target_os = "linux" , windows) ) ]
812mod execute;
13+ #[ cfg( any( target_os = "linux" , windows) ) ]
914mod shutdown;
15+ #[ cfg( any( target_os = "linux" , windows) ) ]
1016mod trace;
1117#[ cfg( windows) ]
1218mod winsvc;
1319
14- // This is here to satisfy rust-analyzer on macos. Pipette does not yet support
15- // macos.
16- #[ cfg( target_os = "macos" ) ]
17- fn main ( ) -> anyhow:: Result < ( ) > {
18- anyhow:: bail!( "unsupported on macos" )
19- }
20-
21- #[ cfg( any( target_os = "linux" , target_os = "windows" ) ) ]
20+ #[ cfg( any( target_os = "linux" , windows) ) ]
2221fn main ( ) -> anyhow:: Result < ( ) > {
2322 #[ cfg( windows) ]
2423 if std:: env:: args ( ) . nth ( 1 ) . as_deref ( ) == Some ( "--service" ) {
@@ -30,3 +29,8 @@ fn main() -> anyhow::Result<()> {
3029 agent. run ( ) . await
3130 } )
3231}
32+
33+ #[ cfg( not( any( target_os = "linux" , windows) ) ) ]
34+ fn main ( ) -> anyhow:: Result < ( ) > {
35+ anyhow:: bail!( "unsupported platform" ) ;
36+ }
Original file line number Diff line number Diff line change 33
44//! Handler for the power off request.
55
6- #![ cfg( any( target_os = "linux" , target_os = "windows" ) ) ]
76// UNSAFETY: required for Windows shutdown API
87#![ cfg_attr( windows, expect( unsafe_code) ) ]
98
You can’t perform that action at this time.
0 commit comments