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

Can't compile for target wasm32-unknown-emscripte #24

Open
gagarin55 opened this issue Dec 22, 2023 · 5 comments
Open

Can't compile for target wasm32-unknown-emscripte #24

gagarin55 opened this issue Dec 22, 2023 · 5 comments

Comments

@gagarin55
Copy link

Hello,

When cargo build --target wasm32-unknown-emscripten the lib doesn't compile.

It seems the issue in [lib] section in cargo.toml

@ross-weir
Copy link

Could you please give me an idea of the use-case?

My understanding is that wasm32-unknown-emscripten doesn't have a good level of support from the rust team

@gagarin55
Copy link
Author

The lib need to be used in different projects. For us it important to compile it into emscripten.

Could you please just remove "cdylib".

@gagarin55
Copy link
Author

It's not a good idea to decide how developers should use the library.

@ross-weir
Copy link

It's not a good idea to decide how developers should use the library.

I'm not "deciding how developers should use the library", I'm trying to determine if supporting a target that is prone to breaking and has a low level of support from the Rust team themselves is worth the effort.

This allows the library to be built as wasm using wasm32-unknown-emscripten:

export EMCC_CFLAGS="-s ERROR_ON_UNDEFINED_SYMBOLS=0 --no-entry -gsource-map -s STANDALONE_WASM"
cargo build --target wasm32-unknown-emscripten

@gagarin55
Copy link
Author

Just remove useless "cdylib".

This ERROR_ON_UNDEFINED_SYMBOLS=0 can't be used btw

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

2 participants