Skip to content

Commit cf69228

Browse files
luffykaialv-around
authored andcommitted
chore: make some fields public for custom serde implementations (#1379)
1 parent 3c5011a commit cf69228

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

crates/vm/src/arch/extensions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ pub struct VmInventory<E, P> {
218218
#[derive(Clone, Serialize, Deserialize)]
219219
pub struct VmInventoryState {
220220
/// Executor states in order
221-
executors: Vec<Vec<u8>>,
221+
pub executors: Vec<Vec<u8>>,
222222
/// Periphery states in order
223-
periphery: Vec<Vec<u8>>,
223+
pub periphery: Vec<Vec<u8>>,
224224
}
225225

226226
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
@@ -479,8 +479,8 @@ pub struct VmChipComplex<F: PrimeField32, E, P> {
479479

480480
#[derive(Clone, Serialize, Deserialize)]
481481
pub struct VmChipComplexState<F> {
482-
base: SystemBaseState<F>,
483-
inventory: VmInventoryState,
482+
pub base: SystemBaseState<F>,
483+
pub inventory: VmInventoryState,
484484
}
485485

486486
/// The base [VmChipComplex] with only system chips.

crates/vm/src/system/memory/paged_vec.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use serde::{Deserialize, Serialize};
55
use crate::arch::MemoryConfig;
66

77
/// (address_space, pointer)
8-
pub(crate) type Address = (u32, u32);
9-
pub(crate) const PAGE_SIZE: usize = 1 << 12;
8+
pub type Address = (u32, u32);
9+
pub const PAGE_SIZE: usize = 1 << 12;
1010

1111
#[derive(Debug, Clone, Serialize, Deserialize)]
12-
pub(crate) struct PagedVec<T, const PAGE_SIZE: usize> {
13-
pages: Vec<Option<Vec<T>>>,
12+
pub struct PagedVec<T, const PAGE_SIZE: usize> {
13+
pub pages: Vec<Option<Vec<T>>>,
1414
}
1515

1616
// ------------------------------------------------------------------
@@ -229,8 +229,8 @@ impl<T: Clone, const PAGE_SIZE: usize> Iterator for PagedVecIter<'_, T, PAGE_SIZ
229229

230230
#[derive(Debug, Clone, Serialize, Deserialize)]
231231
pub struct AddressMap<T, const PAGE_SIZE: usize> {
232-
paged_vecs: Vec<PagedVec<T, PAGE_SIZE>>,
233-
as_offset: u32,
232+
pub paged_vecs: Vec<PagedVec<T, PAGE_SIZE>>,
233+
pub as_offset: u32,
234234
}
235235

236236
impl<T: Clone + Default, const PAGE_SIZE: usize> Default for AddressMap<T, PAGE_SIZE> {

0 commit comments

Comments
 (0)