Rename misleading serde feature to iter-ext#15
Merged
Conversation
The `serde` feature flag was misleading: the serde crate is an unconditional dependency, and the feature only gated the `iter_ext` module (par_map/try_par_map). Rename it to `iter-ext` to accurately reflect what it controls. Also fix inaccurate doc comments on run_bytes/try_run_bytes that referenced the non-existent serde feature gate.
…ate runs - Use matrix include with named codec variants (postcard/pot) for readable job names instead of raw cargo flags - Add codec matrix to integration tests via npm scripts (test:pot) - Set workspace dep to default-features = false so test crate can switch codecs independently - Only trigger on push to main + all PRs (avoids duplicate runs)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames the misleading serde feature flag to iter-ext (since serde is an unconditional dependency and the feature only gated the iterator extensions), and updates docs/CI/test scaffolding accordingly.
Changes:
- Rename feature gate from
serdetoiter-extfor theiter_extmodule (par_map/try_par_map) and update references across the repo. - Fix documentation/comments that incorrectly referenced a
serdefeature gate, and suppress adead_codelint wheniter-extis disabled. - Extend the test harness/CI to exercise builds/tests with
codec-pot(including new npm scripts + atestjob matrix).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test/package.json |
Adds :pot build/test scripts to run Playwright tests against a codec-pot build. |
test/Cargo.toml |
Adds feature flags to toggle wasmworker codec features from wasm-pack/CI. |
src/webworker/worker.rs |
Removes inaccurate doc guidance about enabling a non-existent serde feature. |
src/pool/mod.rs |
Same doc fix for WebWorkerPool::run_bytes. |
src/lib.rs |
Gates iter_ext module behind feature = "iter-ext". |
src/func.rs |
Suppresses dead_code warning for WebWorkerFn::func when iter-ext is off. |
demo/Cargo.toml |
Updates demo’s wasmworker dependency feature list (currently incomplete for demo usage). |
README.md |
Updates user-facing docs to describe iter-ext and removes references to a serde feature flag. |
Cargo.toml |
Renames feature serde -> iter-ext and adjusts workspace dependency defaults. |
.github/workflows/test.yml |
Updates CI feature matrices and adds postcard/pot test matrix for npm tests. |
💡 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.
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
serdefeature flag was misleading: the serde crate is an unconditional dependency, and the feature only gated theiter_extmodule (par_map/try_par_map). Renamed toiter-extto accurately describe what it controls.run_bytes/try_run_bytesthat referenced a non-existent serde feature gate.#[cfg_attr(not(feature = "iter-ext"), allow(dead_code))]onWebWorkerFn::functo suppress the dead-code warning wheniter-extis disabled (the field is only used intry_par_map's fallback path).Breaking change: Users with
features = ["serde"]need to update tofeatures = ["iter-ext"](or just use default features).Test plan
cargo +nightly clippy --all-features— passescargo +nightly clippy --no-default-features --features codec-postcard— no dead_code warningcargo +nightly clippy --no-default-features --features iter-ext,codec-pot— passescargo test --doc --all-features— passescargo +nightly fmt --all -- --check— passes