-
Notifications
You must be signed in to change notification settings - Fork 1
Rust client. #28
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
Rust client. #28
Conversation
…eference old code.
… doctests aren't passing. Going to attempt to replace #[events()] with a #[event_handler] proc macro impl block again.
…tes, change names, LSP support working with proc macro etc.
…ld proc macro, different code gen etc.
…han wanted behavour and thus I will be adding command API and maybe better error handling to the handler fns.
…e rough edges, add more testing and then will be good for release
…mmand attr, removed the extra proc macro, cleaner code overall imo.
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 introduces a comprehensive Rust client SDK for the Dragonfly plugin system. The implementation includes a code generation pipeline, procedural macros for ergonomic API design, and extensive documentation and testing.
Key Changes:
- Added debug logging to Go plugin adapters for event tracking and timing
- Implemented a complete Rust SDK with derive macros, event handlers, and command system
- Created a 3-phase code generation pipeline (proto → prost → xtask-generated ergonomic API)
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
plugin/adapters/plugin/process.go |
Added debug logging for event lifecycle tracking |
plugin/adapters/plugin/manager.go |
Added timing and debug logs for event dispatch |
packages/rust/xtask/src/utils.rs |
AST parsing utilities for code generation |
packages/rust/xtask/src/*.rs |
Code generators for handlers, mutations, and actions |
packages/rust/src/lib.rs |
Main SDK entry point with connection handling |
packages/rust/src/event/* |
Event system implementation |
packages/rust/src/command.rs |
Command parsing and execution framework |
packages/rust/macro/src/* |
Procedural macros for Plugin and Command derives |
packages/rust/tests/* |
Integration tests for SDK components |
examples/plugins/rust/* |
Example economy plugin demonstrating SDK usage |
packages/rust/README.md |
Comprehensive SDK documentation |
packages/rust/MAINTAINING.md |
Maintainer guide for code generation pipeline |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
looks good to me! |
The rust client
adds bindings ontop of the generated proto into a nice crate style.
Has documentation, tests (unit, trybuild, snapshots).
examples in readmes and in examples/plugin and in the packages/rust/example. One complex one simple.