Skip to content

Instructions for how to disable dynamic linking when compiling to WASM #10054

Closed
@SIGSTACKFAULT

Description

bevy/dynamic_linking doesn't work when compiling to WASM:

$ cargo build --lib --target wasm32-unknown-unknown --features bevy/dynamic_linking
error: cannot produce dylib for `bevy_dylib v0.11.3` as the target `wasm32-unknown-unknown` does not support these crate types
$ cargo build --lib --target wasm32-unknown-unknown
    Finished dev [unoptimized + debuginfo] target(s) in 0.31s

The Fast Compiles section of the book should show to to make bevy/dynamic_linking disabled automagically on WASM (or, alternatively, enabled only on x86)

Metadata

Assignees

No one assigned

    Labels

    C-BugAn unexpected or incorrect behaviorO-WebSpecific to web (WASM) buildsP-Compile-FailureA failure to compile Bevy apps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions