Skip to content

refine: Clean code#115

Merged
junyu0312 merged 1 commit intomainfrom
refine
Apr 2, 2026
Merged

refine: Clean code#115
junyu0312 merged 1 commit intomainfrom
refine

Conversation

@junyu0312
Copy link
Copy Markdown
Owner

@junyu0312 junyu0312 commented Apr 2, 2026

Summary by CodeRabbit

  • Refactor
    • Restructured internal architecture handling code to streamline the codebase.

@junyu0312 junyu0312 merged commit 7bf0fc8 into main Apr 2, 2026
7 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 704c4dee-ec50-4631-9c13-f639ecc3c810

📥 Commits

Reviewing files that changed from the base of the PR and between 2d4db9f and 88e70be.

📒 Files selected for processing (2)
  • crates/vm-core/src/arch/aarch64.rs
  • crates/vm-core/src/arch/x86_64.rs

📝 Walkthrough

Walkthrough

This PR removes the AArch64 and X86_64 public structs along with their Arch trait implementations from the architecture-specific modules. The submodules for layout, vcpu, and vm_exit remain, but the architecture entry points are no longer defined at the struct level.

Changes

Cohort / File(s) Summary
Architecture Entry Point Removal
crates/vm-core/src/arch/aarch64.rs, crates/vm-core/src/arch/x86_64.rs
Removed public AArch64 and X86_64 structs and their Arch trait implementations, including associated types (VmExitReason, Layout) and accessor methods (get_layout, get_layout_mut). Submodules remain exported.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • junyu0312/rust-vm#79: Modifies the same architecture files (aarch64.rs and x86_64.rs), restructuring the architecture-level API surface by moving/renaming modules.

Poem

🐰 Away with the structs that cluttered the arch,
No more do we march down the trait-laden path!
The layout remains in its tidy abode,
While Aarch and x86 lighten the load! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refine

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant