Skip to content

no_std regression: is features = ["web"] supposed to affect non-web targets? #22168

@kpreid

Description

@kpreid

Bevy version and features

  • bevy = { version = "0.17.0", default-features = false, features = ["web"] }
  • bevy = { version = "0.18.0-rc.1", default-features = false, features = ["web"] }

[Optional] Relevant system information

  • cargo 1.92.0 (344c4567c 2025-10-21)
  • --target=thumbv7em-none-eabihf (mostly-arbitrary choice of no_std target)

What you did

Writing libraries that use bevy_ecs and are intended to be compatible with both web targets and and non-web no_std targets

What went wrong

In Bevy 0.16, cargo build --target=thumbv7em-none-eabihf succeeds with the dependency specification

bevy = { version = "0.16.0", default-features = false, features = ["web"] }

In later versions, the build fails due to attempting to build foldhash with the "std" feature enabled. There is nothing in https://bevy.org/learn/migration-guides/0-16-to-0-17/ documenting that this failure is expected.

Additional information

The question raised by this issue is: is the "web" feature intended to be harmless on non-web targets?

  • If yes, then there has been a regression in no_std support since Bevy 0.17.
  • Either way, the documentation of the "web" feature should be clarified. Currently, it says “Note this is currently only applicable on wasm32 architectures”, but it is not clear whether “applicable” is intended to mean “is only compatible with” or “only affects”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorO-WebSpecific to web (WASM) buildsP-RegressionFunctionality that used to work but no longer does. Add a test for this!S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions