Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix examples #3813

Merged
merged 5 commits into from
Mar 2, 2025
Merged

Fix examples #3813

merged 5 commits into from
Mar 2, 2025

Conversation

Madoshakalaka
Copy link
Member

@Madoshakalaka Madoshakalaka commented Mar 1, 2025

The demo wesites are down because trunk failures are ignored and empty content was published.

This fixes the build failures by using the latest wasm_opt (version_122)

Additionally

  • we emit warnings when outdated wasm-opt is detected for the example crates.
  • we provided a tool to update wasm-opt in batch via cargo r -p build-examples -b update-wasm-opt
  • correctly exclude wasi_ssr_module because it doesn't need trunk (it has been failing silently in the worflow since last year)
  • exit with non-zero exit code when trunk fails to avoid publishing empty examples
  • only pass getrandom_backend cfg for examples that need it. see rand 0.8 -> 0.9 #3808 (review)

github-actions[bot]
github-actions bot previously approved these changes Mar 1, 2025
Copy link

github-actions bot commented Mar 1, 2025

Size Comparison

examples master (KB) pull request (KB) diff (KB) diff (%)

✅ None of the examples has changed their size significantly.

#![cfg_attr(nightly_yew, feature(fn_traits, async_closure, unboxed_closures))]
#![cfg_attr(nightly_yew, feature(fn_traits, unboxed_closures))]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this emits warning cuz async_closure is stablized

Copy link

github-actions bot commented Mar 1, 2025

Visit the preview URL for this PR (updated for commit 59685ab):

https://yew-rs-api--pr3813-fix-examples-re4j7aii.web.app

(expires Sun, 09 Mar 2025 14:42:06 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Copy link

github-actions bot commented Mar 1, 2025

Benchmark - core

Yew Master

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.67 ns       │ 2.856 ns      │ 2.68 ns       │ 2.683 ns      │ 100     │ 1000000000

Pull Request

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.554 ns      │ 2.959 ns      │ 2.566 ns      │ 2.586 ns      │ 100     │ 1000000000

github-actions[bot]
github-actions bot previously approved these changes Mar 1, 2025
Copy link

github-actions bot commented Mar 1, 2025

Benchmark - SSR

Yew Master

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 310.347 311.358 310.671 0.308
Hello World 10 489.927 538.451 499.223 14.165
Function Router 10 1613.490 1627.012 1619.140 4.295
Concurrent Task 10 1005.901 1007.736 1006.668 0.551
Many Providers 10 1098.187 1164.389 1120.325 19.745

Pull Request

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 310.378 311.135 310.652 0.211
Hello World 10 470.965 529.750 485.040 18.315
Function Router 10 1595.395 1698.741 1611.606 31.080
Concurrent Task 10 1005.050 1007.726 1006.498 0.757
Many Providers 10 1119.867 1200.818 1144.642 26.351

@Madoshakalaka Madoshakalaka added A-examples Area: The examples A-ci Area: The continuous integration A-tools Area: Tools such as trunk, wasm-bindgen labels Mar 1, 2025
@Madoshakalaka Madoshakalaka merged commit fceec0a into master Mar 2, 2025
25 checks passed
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 A-examples Area: The examples A-tools Area: Tools such as trunk, wasm-bindgen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant