Skip to content

Conversation

@aarkegz
Copy link
Contributor

@aarkegz aarkegz commented Jan 7, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the axvisor_api crate from crate_interface v0.1 to v0.2, with corresponding version bumps to v0.2.0 for both the main crate and the procedural macro crate. The migration involves a major refactoring of the API definition and implementation mechanism, moving from an extern fn-based approach to a trait-based approach.

Key Changes:

  • Refactored API definition from #[api_mod] with extern fn syntax to #[api_def] on trait definitions
  • Refactored API implementation from #[api_mod_impl] with extern fn syntax to #[api_impl] on trait implementations
  • Reorganized APIs into separate module files (memory.rs, time.rs, vmm.rs, host.rs, arch.rs) instead of inline modules in lib.rs

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
Cargo.toml Bumped version to 0.2.0 and updated crate_interface dependency to 0.2
axvisor_api_proc/Cargo.toml Bumped proc macro crate version to 0.2.0
axvisor_api_proc/src/lib.rs Completely rewrote procedural macros to use crate_interface v0.2's def_interface and impl_interface with namespaces
axvisor_api_proc/src/items.rs Removed file as custom parsing for extern fn syntax is no longer needed
src/lib.rs Major documentation rewrite and module structure reorganization
src/memory.rs New file extracting memory API from inline module
src/time.rs New file extracting time API from inline module
src/vmm.rs New file extracting VMM API from inline module
src/host.rs New file extracting host API from inline module
src/arch.rs New file extracting architecture-specific API from inline module
src/test.rs Updated test implementation to use new trait-based API implementation approach
examples/example.rs Updated example to demonstrate new API definition and implementation pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aarkegz aarkegz merged commit aae42f5 into master Jan 7, 2026
18 checks passed
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.

3 participants