hero_lifecycle forces tokio/full unconditionally — breaks wasm32 consumers (e.g. hero_collab_app) #156
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_lib#156
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
hero_lifecycledeclarestokio = { features = ["full"] }unconditionally in its Cargo.toml. Thefullfeature pulls intokio/net→mio, which does not compile forwasm32-unknown-unknown:Any WASM crate that (transitively) depends on
hero_lifecycletherefore cannot build forwasm32.Impact
Surfaced while migrating hero_collab to oschema-first:
hero_collab_app(Dioxus/WASM admin dashboard) cannot produce a wasm build because it pullshero_lifecycle. The app's own code is wasm-clean (cargo checkon the host target is green and it adds no deps) — the blocker is purelyhero_lifecycle's unconditionaltokio/full. Reproduces at HEAD (pre-existing, not introduced by the collab migration).Suggested fix
Gate the heavy tokio features behind a target/feature so wasm consumers get a minimal tokio (or none). E.g.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] tokio = { features = ["full"] }+ a slim[target.'cfg(target_arch = "wasm32")'.dependencies] tokio = { features = ["sync", "macros"] }, or aserver/nativefeature that the binary crates enable and wasm crates don't.Note (separate, toolchain)
There is also a local
dx(0.7.4) vs project dioxus (0.7.9) version skew that mis-selects thestandalone-gated[[bin]]duringdx build— a toolchain/version alignment issue, not a code one. Mentioned for completeness; the tokio/full issue is the code-level root cause.Ref: hero_collab oschema migration (lhumina_code/hero_collab#78); hero_collab_app wasm build.