Skip to content

Make wasmworker-proc-macro a feature dependency#12

Merged
paberr merged 1 commit intomainfrom
feature/proc-macro-feature
Mar 8, 2026
Merged

Make wasmworker-proc-macro a feature dependency#12
paberr merged 1 commit intomainfrom
feature/proc-macro-feature

Conversation

@paberr
Copy link
Owner

@paberr paberr commented Mar 8, 2026

Summary

  • Adds a macros feature to wasmworker that re-exports wasmworker-proc-macro
  • Users can now depend on just wasmworker = { features = ["macros"] } instead of adding both crates
  • Updates demo and test crates to use the new feature instead of a direct dependency

Non-breaking

This is a purely additive change — no existing behavior is affected. The wasmworker-proc-macro crate continues to work standalone.

Test plan

  • cargo +nightly clippy --all-features
  • cargo +nightly fmt --all -- --check
  • cargo test --doc
  • Integration tests pass (4/4: chromium + firefox, web + vite)

Closes #8

Copy link
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 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 macros feature to wasmworker and gated re-export of wasmworker-proc-macro behind it.
  • Updated demo and test crates to import proc-macros from wasmworker instead of depending directly on wasmworker-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
@paberr paberr force-pushed the feature/proc-macro-feature branch from e34ffc0 to f796a8d Compare March 8, 2026 14:19
@paberr paberr merged commit 9f033f1 into main Mar 8, 2026
8 checks passed
@paberr paberr deleted the feature/proc-macro-feature branch March 8, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make wasmworker-proc-macro a feature dependency

2 participants