Conversation
Contributor
There was a problem hiding this comment.
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]withextern fnsyntax to#[api_def]on trait definitions - Refactored API implementation from
#[api_mod_impl]withextern fnsyntax 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 inlib.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.
hky1999
approved these changes
Jan 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.