-
Notifications
You must be signed in to change notification settings - Fork 6
[FEATURE] [RPC] Create Procedural Macro for Handler Definitions #41
Copy link
Copy link
Closed
Labels
coinswap-migration-phase-2The 2nd phase in integration of mill-io inside CoinswapThe 2nd phase in integration of mill-io inside CoinswapenhancementNew feature or requestNew feature or requestmill-rpcRelated to mill-rpc, our mill-io-based RPC frameworkRelated to mill-rpc, our mill-io-based RPC framework
Description
Description
Implement the #[rpc_handler] procedural macro to make handler definition ergonomic.
Motivation
Allow users to write handlers as simple async functions without boilerplate.
Proposed Solution
#[rpc_handler]
async fn add(params: AddParams) -> Result<i32> {
Ok(params.a + params.b)
}Tasks
- Create mill-rpc-macros crate
- Implement #[rpc_handler] macro
- Support async functions
- Add parameter extraction
- Handle errors properly
- Support compute pool attribute:
#[rpc_handler(compute)] - Write macro tests
- Document macro usage
Expected
- Ergonomic handler definition
- Automatic parameter extraction
- Error handling integration
- Compute pool support
Dependencies:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coinswap-migration-phase-2The 2nd phase in integration of mill-io inside CoinswapThe 2nd phase in integration of mill-io inside CoinswapenhancementNew feature or requestNew feature or requestmill-rpcRelated to mill-rpc, our mill-io-based RPC frameworkRelated to mill-rpc, our mill-io-based RPC framework