Skip to content

ci: replace hand-maintained feature-soundness scripts with cargo-hack#4013

Open
Madoshakalaka wants to merge 1 commit intomasterfrom
feat/cargo-hack-feature-soundness
Open

ci: replace hand-maintained feature-soundness scripts with cargo-hack#4013
Madoshakalaka wants to merge 1 commit intomasterfrom
feat/cargo-hack-feature-soundness

Conversation

@Madoshakalaka
Copy link
Member

Description

98 combinations from the full powerset might be unrealistic for CI

that's why there's --exclude-features test,serde,not_browser_env. These features don't gate any code paths

This then results in 14 clippy invocations are identical to what the old scripts ran, but now auto-discovered by cargo hack, so when features are added/removed, CI adapts automatically

--keep-going added so all failures are reported at once

Fixes #2641

Checklist

  • I have reviewed my own code
@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 26462bf):

https://yew-rs-api--pr4013-feat-cargo-hack-feat-3dhwlmdc.web.app

(expires Fri, 06 Mar 2026 08:56:14 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

Benchmark - core

Yew Master

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.748 ns      │ 4.142 ns      │ 3.992 ns      │ 3.455 ns      │ 100     │ 1000000000

Pull Request

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.776 ns      │ 4.346 ns      │ 2.781 ns      │ 2.841 ns      │ 100     │ 1000000000

@Madoshakalaka Madoshakalaka added the A-ci Area: The continuous integration label Feb 27, 2026
@github-actions
Copy link

Size Comparison

Details
examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 96.691 96.691 0 0.000%
boids 165.387 165.387 0 0.000%
communication_child_to_parent 89.882 89.882 0 0.000%
communication_grandchild_with_grandparent 100.924 100.924 0 0.000%
communication_grandparent_to_grandchild 97.420 97.420 0 0.000%
communication_parent_to_child 87.297 87.297 0 0.000%
contexts 102.917 102.917 0 0.000%
counter 84.030 84.030 0 0.000%
counter_functional 85.377 85.377 0 0.000%
dyn_create_destroy_apps 87.023 87.023 0 0.000%
file_upload 96.557 96.557 0 0.000%
function_delayed_input 90.956 90.956 0 0.000%
function_memory_game 168.924 168.924 0 0.000%
function_router 402.408 402.408 0 0.000%
function_todomvc 160.895 160.895 0 0.000%
futures 232.361 232.361 0 0.000%
game_of_life 102.204 102.204 0 0.000%
immutable 244.353 244.353 0 0.000%
inner_html 78.611 78.611 0 0.000%
js_callback 106.553 106.553 0 0.000%
keyed_list 177.156 177.156 0 0.000%
mount_point 81.742 81.742 0 0.000%
nested_list 110.727 110.727 0 0.000%
node_refs 89.185 89.185 0 0.000%
password_strength 1726.269 1726.269 0 0.000%
portals 90.762 90.762 0 0.000%
router 374.131 374.131 0 0.000%
suspense 110.940 110.940 0 0.000%
timer 86.487 86.487 0 0.000%
timer_functional 96.045 96.045 0 0.000%
todomvc 139.498 139.498 0 0.000%
two_apps 83.893 83.893 0 0.000%
web_worker_fib 133.651 133.651 0 0.000%
web_worker_prime 184.603 184.603 0 0.000%
webgl 81.166 81.166 0 0.000%

✅ None of the examples has changed their size significantly.

@Madoshakalaka
Copy link
Member Author

Madoshakalaka commented Feb 27, 2026

The feature soundness tests actually complete in 2 minutes, which is faster than documentation tests (3 mins), unit test (5 mins), and integration tests (5 mins), not mentioning SSR benchmarks (15+ minutes)

so a full powerset with 7 times the invocation is not unrealistic. I don't oppose adding them too but they might not add much value.

For reference

Feature cfg(feature usages in packages/yew/src Purpose
csr Heavy (dom_bundle, renderer, lifecycle) Client-side rendering
ssr Heavy (server_renderer, hydration hooks) Server-side rendering
hydration Heavy (implies csr, bincode) Hydration of SSR markup
default Toggles behavior in some paths Default feature set
serde 0 — just passes to implicit-clone Serde support for types
not_browser_env 0 Non-browser environment flag
test 2, both alongside #[cfg(test)] Test utilities
@github-actions
Copy link

Benchmark - SSR

Yew Master

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 257.962 258.368 258.109 0.121
Hello World 10 454.624 467.368 458.897 3.332
Function Router 10 38613.669 39300.850 38953.595 213.846
Concurrent Task 10 1005.615 1006.872 1006.380 0.412
Many Providers 10 1049.422 1104.803 1069.046 19.389

Pull Request

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 257.979 259.503 258.303 0.447
Hello World 10 461.412 475.461 465.351 4.276
Function Router 10 38727.891 39142.046 38951.575 141.568
Concurrent Task 10 1005.721 1006.728 1006.288 0.367
Many Providers 10 1033.427 1076.381 1048.551 13.214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ci Area: The continuous integration

1 participant