"unknown file type lib.rmeta" when compiling Emscripten side module #92738
Labels
A-linkage
Area: linking into static, shared libraries and binaries
C-bug
Category: This is a bug.
O-emscripten
Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL!
O-wasm
Target: WASM (WebAssembly), http://webassembly.org/
Because of the
lib.rmeta
file, linking rust libraries doesn't work with-Wl,--whole-archive
.When compiling an Emscripten side module as follows:
I get the error
This error occurs so long as
emcc
is invoked to link at least one.rlib
file. I am usingI have tested that the error occurs with both emscripten v3.1.0 and emscripten v2.0.16. I have had success with patching the emscripten linker to run
ar -d some_library.rlib lib.rmeta
to fix this.I am compiling
lib.rs
which looks as follows:lib.rs
and my
Cargo.toml
is:Cargo.toml
The text was updated successfully, but these errors were encountered: