-
Notifications
You must be signed in to change notification settings - Fork 6
Migrate to crate_interface v0.2, bump to v0.2
#7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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]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.
No description provided.