cloudflare / cloudflare/workers-rs

npx wrangler dev fails off a fresh project generated with cargo generate cloudflare/workers-rs and leptos template

Open
#1,026 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.7k
Forks
429
Avg merge
20h 28m
Merged PRs (30d)
7

Description

Steps to arrive at this problem

cargo generate cloudflare/workers-rs
..
template -> leptos
nightly features -> false
windows syntax-> false
...

npx wranger dev

...
A bunch of rust-lld errors such as
= note: rust-lld: error: duplicate symbol: __wbg_intounderlyingbytesource_free

rustc 1.97.0 (2d8144b78 2026-07-07)
cargo 1.97.0 (c980f4866 2026-06-30)

One suspect I have is that Cargo.lock has two wasm-streams versions.

% grep "wasm-streams " Cargo.lock
"wasm-streams 0.5.0",
"wasm-streams 0.6.0",

One workaround is to downgrade worker to 0.7

[build]
command = "cargo leptos build --release && cargo install -q \"worker-build@^0.7\" ...

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure from a fresh workers-rs project using the cargo generate leptos template, then run npx wrangler dev and inspect the duplicate rust-lld symbols. Compare the two wasm-streams entries in Cargo.lock and the worker 0.7 workaround; done means the generated project builds and starts without duplicate-symbol errors using the current setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
backend, build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.