vihaco_cpu/program_cpu.rs
1// SPDX-FileCopyrightText: 2026 The vihaco Authors
2// SPDX-License-Identifier: MIT
3
4#[path = "heap.rs"]
5mod heap;
6
7use heap::Heap;
8
9#[vihaco_runtime::component]
10#[instructions { crate::cpu }]
11#[derive(Default, Debug)]
12pub struct CPU {
13 pub(crate) heap: Heap,
14}
15
16impl vihaco_abi::traits::Reset for CPU {
17 fn reset(&mut self) {
18 self.heap.clear();
19 }
20}