// on web copy libraylib.bc to libraylib.a
if platform == Platform::Web {
std::fs::copy(dst_lib.join("libraylib.bc"), dst_lib.join("libraylib.a"))
.expect("filed to create wasm library");
}
But for some reason, on my system (6.1.31-2-MANJARO (64-bit)), with command cargo build --target=wasm32-unknown-emscripten it builds into "libraylib.a".
I suggest doing this:
// on web copy libraylib.bc to libraylib.a (if exists)
if platform == Platform::Web {
if dst_lib.join("libraylib.bc").exists() {
std::fs::copy(dst_lib.join("libraylib.bc"), dst_lib.join("libraylib.a"))
.expect("filed to create wasm library");
}
}
Hello!
I'm using raylib-rs v3.7.0.
In raylib-sys/build.rs there is this:
But for some reason, on my system (6.1.31-2-MANJARO (64-bit)), with command
cargo build --target=wasm32-unknown-emscripten
it builds into "libraylib.a".I suggest doing this: