@@ -13,11 +13,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
+ #![ deny( dead_code, missing_docs, unused_mut) ]
17
+ //! This crate contains an SDK that is used to execute specially-
18
+ // compiled binaries within a very lightweight hypervisor environment.
16
19
17
20
use std:: sync:: Once ;
18
21
19
- /// This crate contains an SDK that is used to execute specially-
20
- /// compiled binaries within a very lightweight hypervisor environment.
21
22
use log:: info;
22
23
/// The `built` crate is used to generate a `built.rs` file that contains
23
24
/// information about the build environment. This information is used to
@@ -26,13 +27,10 @@ pub(crate) mod built_info {
26
27
include ! ( concat!( env!( "OUT_DIR" ) , "/built.rs" ) ) ;
27
28
}
28
29
/// Dealing with errors, including errors across VM boundaries
29
- #[ deny( dead_code, missing_docs, unused_mut) ]
30
30
pub mod error;
31
31
/// Wrappers for host and guest functions.
32
- #[ deny( dead_code, missing_docs, unused_mut) ]
33
32
pub mod func;
34
33
/// Wrappers for hypervisor implementations
35
- #[ deny( dead_code, missing_docs, unused_mut) ]
36
34
pub mod hypervisor;
37
35
/// Functionality to establish and manage an individual sandbox's
38
36
/// memory.
@@ -62,15 +60,12 @@ pub mod hypervisor;
62
60
///
63
61
/// The pointer passed to the Entrypoint in the Guest application is the 0x200000 + size of page table + size of code,
64
62
/// at this address structs below are laid out in this order
65
- #[ deny( dead_code, missing_docs, unused_mut) ]
66
63
pub mod mem;
67
64
/// Metric definitions and helpers
68
- #[ deny( dead_code, missing_docs, unused_mut) ]
69
65
pub mod metrics;
70
66
/// The main sandbox implementations. Do not use this module directly in code
71
67
/// outside this file. Types from this module needed for public consumption are
72
68
/// re-exported below.
73
- #[ deny( dead_code, missing_docs, unused_mut) ]
74
69
pub mod sandbox;
75
70
/// `trait`s and other functionality for dealing with defining sandbox
76
71
/// states and moving between them
@@ -82,7 +77,6 @@ pub(crate) mod seccomp;
82
77
pub ( crate ) mod signal_handlers;
83
78
/// Utilities for testing including interacting with `simpleguest.exe`
84
79
/// and `callbackguest.exe`, our two most basic guest binaries for testing
85
- #[ deny( missing_docs, unused_mut) ]
86
80
#[ cfg( test) ]
87
81
pub ( crate ) mod testing;
88
82
@@ -110,8 +104,8 @@ pub use crate::func::call_ctx::MultiUseGuestCallContext;
110
104
/// The universal `Result` type used throughout the Hyperlight codebase.
111
105
pub type Result < T > = core:: result:: Result < T , error:: HyperlightError > ;
112
106
113
- // Logs an error then returns with it , more or less equivalent to the bail! macro in anyhow
114
- // but for HyperlightError instead of anyhow::Error
107
+ /// Logs an error then returns with it, more or less equivalent to the bail! macro in anyhow
108
+ /// but for HyperlightError instead of anyhow::Error
115
109
#[ macro_export]
116
110
macro_rules! log_then_return {
117
111
( $msg: literal $( , ) ?) => { {
@@ -140,7 +134,7 @@ macro_rules! log_then_return {
140
134
} ;
141
135
}
142
136
143
- // same as log::debug!, but will additionally print to stdout if the print_debug feature is enabled
137
+ /// Same as log::debug!, but will additionally print to stdout if the print_debug feature is enabled
144
138
#[ macro_export]
145
139
macro_rules! debug {
146
140
( $( $arg: tt) +) =>
0 commit comments