Make wasmworker-proc-macro a feature dependency#12
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the wasmworker-proc-macro crate available through the main wasmworker crate via a new macros feature, and updates internal demo/test crates to use the re-exported macros.
Changes:
- Added a
macrosfeature towasmworkerand gated re-export ofwasmworker-proc-macrobehind it. - Updated
demoandtestcrates to import proc-macros fromwasmworkerinstead of depending directly onwasmworker-proc-macro. - Adjusted workspace dependency/lockfile entries to reflect the new dependency shape.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/lib.rs |
Re-exports proc-macros behind cfg(feature = "macros"). |
Cargo.toml |
Adds macros feature + optional dependency; updates workspace dependency features. |
demo/src/lib.rs |
Switches imports to wasmworker::webworker_fn. |
demo/Cargo.toml |
Removes direct wasmworker-proc-macro dependency. |
test/src/raw.rs |
Switches imports to wasmworker::webworker_fn. |
test/src/convert.rs |
Switches imports to wasmworker::webworker_fn. |
test/src/channel.rs |
Switches imports to wasmworker::webworker_channel_fn. |
test/Cargo.toml |
Removes direct wasmworker-proc-macro dependency. |
Cargo.lock |
Removes wasmworker-proc-macro from demo/test dependency lists. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Add a `macros` feature that re-exports wasmworker-proc-macro, so users
can depend on just `wasmworker = { features = ["macros"] }` instead of
adding both crates separately.
Closes #8
e34ffc0 to
f796a8d
Compare
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.
Summary
macrosfeature towasmworkerthat re-exportswasmworker-proc-macrowasmworker = { features = ["macros"] }instead of adding both cratesNon-breaking
This is a purely additive change — no existing behavior is affected. The
wasmworker-proc-macrocrate continues to work standalone.Test plan
cargo +nightly clippy --all-featurescargo +nightly fmt --all -- --checkcargo test --docCloses #8