Skip to content

Webassembly (Wasm) Supported? #39

Open
@shybyte

Description

@shybyte

Is compiling to Webassembly supported?

I have found the file https://github.com/deltaphc/raylib-rs/blob/master/samples/Web.toml, copied it to my own project, installed https://github.com/koute/cargo-web and executed
cargo web build.

It started compiling but stopped with the error:

/home/marco/workspace/private/ray-spike/target/wasm32-unknown-emscripten/debug/build/raylib-sys-e1aa135be1052e2a/out/raylib-2.5.0/src/core.c:3496:9: error: implicit declaration of function 'emscripten_sample_gamepad_data' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (emscripten_sample_gamepad_data() == EMSCRIPTEN_RESULT_SUCCESS) numGamepads = emscripten_get_num_gamepads();
^
/home/marco/workspace/private/ray-spike/target/wasm32-unknown-emscripten/debug/build/raylib-sys-e1aa135be1052e2a/out/raylib-2.5.0/src/core.c:3496:9: note: did you mean 'emscripten_get_gamepad_status'?
/home/marco/.local/share/cargo-web/emscripten/x86_64-unknown-linux-gnu/emscripten/system/include/emscripten/html5.h:399:26: note: 'emscripten_get_gamepad_status' declared here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions