Skip to content

Commit 740e843

Browse files
committed
[common/mem] make peb structures debug, clone, and copy
It's useful for a library to provide implementaitons of these traits for its structures. Signed-off-by: danbugs <[email protected]>
1 parent 48f7288 commit 740e843

File tree

1 file changed

+5
-0
lines changed
  • src/hyperlight_common/src

1 file changed

+5
-0
lines changed

src/hyperlight_common/src/mem.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,28 @@ pub const PAGE_SHIFT: u64 = 12;
2020
pub const PAGE_SIZE: u64 = 1 << 12;
2121
pub const PAGE_SIZE_USIZE: usize = 1 << 12;
2222

23+
#[derive(Debug, Clone, Copy)]
2324
#[repr(C)]
2425
pub struct InputData {
2526
pub inputDataSize: u64,
2627
pub inputDataBuffer: u64,
2728
}
2829

30+
#[derive(Debug, Clone, Copy)]
2931
#[repr(C)]
3032
pub struct OutputData {
3133
pub outputDataSize: u64,
3234
pub outputDataBuffer: u64,
3335
}
3436

37+
#[derive(Debug, Clone, Copy)]
3538
#[repr(C)]
3639
pub struct GuestHeapData {
3740
pub guestHeapSize: u64,
3841
pub guestHeapBuffer: u64,
3942
}
4043

44+
#[derive(Debug, Clone, Copy)]
4145
#[repr(C)]
4246
pub struct GuestStackData {
4347
/// This is the top of the user stack
@@ -46,6 +50,7 @@ pub struct GuestStackData {
4650
pub userStackAddress: u64,
4751
}
4852

53+
#[derive(Debug, Clone, Copy)]
4954
#[repr(C)]
5055
pub struct HyperlightPEB {
5156
pub security_cookie_seed: u64,

0 commit comments

Comments
 (0)