Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"unknown file type lib.rmeta" when compiling rust with --target=wasm32-unknown-emscripten #16689

Closed
hoodmane opened this issue Apr 9, 2022 · 1 comment

Comments

@hoodmane
Copy link
Contributor

hoodmane commented Apr 9, 2022

xref #92738

When compiling rust as follows:

export RUSTFLAGS="-C link-arg=-s -C link-arg=SIDE_MODULE=1 -C relocation-model=pic -C target-feature=+mutable-globals"
cargo +nightly -Z build-std build --target=wasm32-unknown-emscripten

I get the error

wasm-ld: error: unknown file type: lib.rmeta

See #92738 for more details.

As a workaround, I've been applying the following patch:
pyodide/pyodide@cfafcda/emsdk/patches/0001-fix-up-rust-linker-errors.patch

@hoodmane
Copy link
Contributor Author

hoodmane commented Jun 2, 2022

Closed in favor of #17109 which is more specific.

@hoodmane hoodmane closed this as completed Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant