Skip to content

feat(macros): builder params#926

Open
Berrysoft wants to merge 4 commits into
compio-rs:masterfrom
Berrysoft:dev/macros-more-params
Open

feat(macros): builder params#926
Berrysoft wants to merge 4 commits into
compio-rs:masterfrom
Berrysoft:dev/macros-more-params

Conversation

@Berrysoft
Copy link
Copy Markdown
Member

No description provided.

@Berrysoft Berrysoft added this to the v0.19 milestone May 19, 2026
@Berrysoft Berrysoft requested review from AsakuraMizu and Copilot May 19, 2026 14:33
@Berrysoft Berrysoft self-assigned this May 19, 2026
@Berrysoft Berrysoft added the package: macros Related to compio-macros label May 19, 2026
@github-actions github-actions Bot added the enhancement New feature or request label May 19, 2026
Berrysoft and others added 2 commits May 19, 2026 22:34
Co-authored-by: DeepSeek <service@deepseek.com>
@Berrysoft Berrysoft force-pushed the dev/macros-more-params branch from 96c496e to 2bdc5d3 Compare May 19, 2026 14:34
Copy link
Copy Markdown
Contributor

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 extends compio-macros’s #[compio::main] / #[compio::test] attribute macros to accept runtime builder parameters and a nested with_proactor(...) configuration, and updates a couple of integration tests to use the new attribute-based configuration instead of manually building a runtime.

Changes:

  • Reworks the #[compio::test] macro implementation to share logic with #[compio::main] and emit a runtime builder chain.
  • Adds parsing/codegen for runtime builder params (name = value) and proactor builder params via with_proactor(name = value, ...).
  • Updates compio crate tests to configure the proactor via macro parameters.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
compio/tests/runtime.rs Migrates a runtime/proactor configuration test to #[compio_macros::test(with_proactor(...))].
compio/tests/accept.rs Migrates accept test to #[compio_macros::test(with_proactor(driver_type = ...))].
compio-macros/src/test_fn.rs Removes the old dedicated test macro implementation.
compio-macros/src/main_fn.rs Adjusts to delegate emission to shared RawBodyItemFn logic and supports “test mode”.
compio-macros/src/lib.rs Routes #[proc_macro_attribute] test through the unified implementation and adds driver crate resolution helper.
compio-macros/src/item_fn.rs Implements attribute argument parsing and codegen for runtime/proactor builder parameters.
compio-macros/README.md Documents passing builder params, including with_proactor(...).

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

Comment thread compio-macros/src/item_fn.rs Outdated
Comment thread compio-macros/src/item_fn.rs
Comment thread compio-macros/src/item_fn.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request package: macros Related to compio-macros

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants