Skip to content

refactor!: migrate workspace to Rust 1.85 and Edition 2024#4114

Merged
Madoshakalaka merged 13 commits intomasterfrom
rust-1.85
Apr 5, 2026
Merged

refactor!: migrate workspace to Rust 1.85 and Edition 2024#4114
Madoshakalaka merged 13 commits intomasterfrom
rust-1.85

Conversation

@Madoshakalaka
Copy link
Copy Markdown
Member

@Madoshakalaka Madoshakalaka commented Apr 5, 2026

Description

Migrate the entire workspace to Rust 1.85 / Edition 2024.

Checklist

  • fake major version was ignored but now we can update it
  • rand 0.10
  • I have reviewed my own code

- Set edition = "2024" in all 55 member crates
- Centralize rust-version = "1.85" in [workspace.package]
- Add unsafe to extern "C" blocks (Edition 2024 requirement)
- Remove redundant ref/ref mut in match patterns (match ergonomics)
- Escape reserved keyword gen as r#gen in examples
- Fix RPIT lifetime over-capture in TagTokens::to_spanned and Registry::get_handler
- Remove ref from macro-generated pattern in html_element.rs
- Update rustfmt.toml and CI workflows to 1.85
- Apply Edition 2024 rustfmt style
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 5, 2026

Benchmark - core

Yew Master

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  4.013 ns      │ 4.267 ns      │ 4.021 ns      │ 4.024 ns      │ 100     │ 1000000000

Pull Request

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  4.011 ns      │ 4.318 ns      │ 4.014 ns      │ 4.018 ns      │ 100     │ 1000000000

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 5, 2026

Visit the preview URL for this PR (updated for commit 569e4df):

https://yew-rs--pr4114-rust-1-85-nstfs4w6.web.app

(expires Sun, 12 Apr 2026 19:52:05 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 5, 2026

Size Comparison

Details
examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 99.941 99.980 +0.039 +0.039%
boids 167.609 163.821 -3.788 -2.260%
communication_child_to_parent 93.235 93.236 +0.001 +0.001%
communication_grandchild_with_grandparent 105.061 105.054 -0.007 -0.007%
communication_grandparent_to_grandchild 101.410 101.412 +0.002 +0.002%
communication_parent_to_child 90.646 90.648 +0.002 +0.002%
contexts 105.110 105.115 +0.005 +0.005%
counter 85.941 85.940 -0.001 -0.001%
counter_functional 87.976 87.976 0 0.000%
dyn_create_destroy_apps 89.865 89.862 -0.003 -0.003%
file_upload 98.951 98.950 -0.001 -0.001%
function_delayed_input 93.924 93.931 +0.007 +0.007%
function_memory_game 172.830 169.043 -3.787 -2.191%
function_router 396.243 397.922 +1.679 +0.424%
function_todomvc 164.054 164.065 +0.012 +0.007%
futures 234.664 234.660 -0.004 -0.002%
game_of_life 104.172 100.273 -3.898 -3.742%
immutable 257.882 257.880 -0.002 -0.001%
inner_html 80.464 80.463 -0.001 -0.001%
js_callback 109.086 109.084 -0.002 -0.002%
keyed_list 179.568 175.777 -3.791 -2.111%
mount_point 83.833 83.832 -0.001 -0.001%
nested_list 112.744 112.743 -0.001 -0.001%
node_refs 91.222 91.224 +0.002 +0.002%
password_strength 1718.404 1718.438 +0.033 +0.002%
portals 92.711 92.713 +0.002 +0.002%
router 367.169 364.637 -2.532 -0.690%
suspense 113.058 113.062 +0.004 +0.003%
timer 88.079 88.078 -0.001 -0.001%
timer_functional 98.566 98.567 +0.001 +0.001%
todomvc 141.760 141.759 -0.001 -0.001%
two_apps 85.805 85.804 -0.001 -0.001%
web_worker_fib 135.562 135.562 0 0.000%
web_worker_prime 183.950 183.963 +0.013 +0.007%
webgl 82.605 82.606 +0.001 +0.001%

⚠️ The following examples have changed their size significantly:

examples master (KB) pull request (KB) diff (KB) diff (%)
boids 167.609 163.821 -3.788 -2.260%
function_memory_game 172.830 169.043 -3.787 -2.191%
game_of_life 104.172 100.273 -3.898 -3.742%
keyed_list 179.568 175.777 -3.791 -2.111%

@Madoshakalaka Madoshakalaka added the A-yew Area: The main yew crate label Apr 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 5, 2026

Benchmark - SSR

Yew Master

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 291.198 291.744 291.481 0.176
Hello World 10 504.949 511.520 507.756 2.583
Function Router 10 31191.808 31866.250 31575.473 203.702
Concurrent Task 10 1006.047 1007.566 1006.964 0.583
Many Providers 10 1070.133 1101.012 1079.648 9.767

Pull Request

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 310.982 314.114 311.503 0.932
Hello World 10 495.615 497.706 496.811 0.656
Function Router 10 32820.837 33790.926 33336.597 337.830
Concurrent Task 10 1006.444 1007.932 1007.039 0.404
Many Providers 10 1074.485 1126.484 1094.935 15.605

Comment thread tools/website-test/build.rs Outdated
- Update workspace rand dependency from 0.9 to 0.10
- Rename trait import Rng to RngExt for extension methods
- Replace removed SmallRng::from_os_rng() with from_rng()
- Remove small_rng feature flag (always available in 0.10)
- Keep rand 0.9 as rand_09 in function_router and router
  examples for lipsum MarkovChain API compatibility
cargo fix --edition conservatively changed all $:expr fragment
specifiers to $:expr_2021 to prevent potential ambiguity with
const {} blocks. None of these macros have conflicting rules
involving const or _ expressions, so the original expr specifier
is correct and allows matching the full Edition 2024 expression
syntax.
getrandom 0.3 (transitive from lipsum's rand 0.9) requires both
the getrandom_backend cfg flag AND the wasm_js crate feature on
wasm32-unknown-unknown. The cfg flag alone is insufficient. Add
getrandom_03 workspace dep to propagate the feature.
# Conflicts:
#	packages/yew-macro/src/props/component.rs
#	packages/yew-macro/src/props/prop.rs
@Madoshakalaka Madoshakalaka marked this pull request as ready for review April 5, 2026 10:07
github-actions[bot]
github-actions Bot previously approved these changes Apr 5, 2026
github-actions[bot]
github-actions Bot previously approved these changes Apr 5, 2026
@Madoshakalaka
Copy link
Copy Markdown
Member Author

Consistent with the findings in #3873, 3242f25 shows great improvements of diagnostics in case of missing props

@Madoshakalaka Madoshakalaka merged commit dcdd698 into master Apr 5, 2026
37 checks passed
@Madoshakalaka Madoshakalaka deleted the rust-1.85 branch April 5, 2026 20:15
Madoshakalaka added a commit that referenced this pull request Apr 5, 2026
Resolve conflict in blist.rs where Edition 2024 migration (#4114)
changed `if let` to `match` while our branch restructured the inner
keyed-reconciliation logic for render-order indices. Take master's
`match ancestor` syntax with our Option<usize> barrier_idx and
flipped comparison directions.
shan-shaji pushed a commit to shan-shaji/yew that referenced this pull request Apr 19, 2026
…4114)

- Set edition = "2024" in all 55 member crates
- Centralize rust-version = "1.85" in [workspace.package]
- Add unsafe to extern "C" blocks (Edition 2024 requirement)
- Remove redundant ref/ref mut in match patterns (match ergonomics)
- Escape reserved keyword gen as r#gen in examples
- Fix RPIT lifetime over-capture in TagTokens::to_spanned and Registry::get_handler
- Remove ref from macro-generated pattern in html_element.rs
- Update rustfmt.toml and CI workflows to 1.85
- Apply Edition 2024 rustfmt style

* chore: regenerate lock

* chore(docs): update if-let gaurd stablization version

* chore: update rand to 0.10

- Update workspace rand dependency from 0.9 to 0.10
- Rename trait import Rng to RngExt for extension methods
- Replace removed SmallRng::from_os_rng() with from_rng()
- Remove small_rng feature flag (always available in 0.10)
- Keep rand 0.9 as rand_09 in function_router and router
  examples for lipsum MarkovChain API compatibility

* chore: update fake to 5.x

* docs: update MSRV to 1.85.0 in Next version docs

* refactor: remove redundant Future imports now in Edition 2024 prelude

* chore: update MSRV references from 1.84.0 to 1.85.0 in macro tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-yew Area: The main yew crate performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant