Compilation fails for wasm32-unknown-emscripten
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.9.1
## \[Optional\] Relevant system information
If you cannot get Bevy to build or run on your machine, please include:
Cargo version: cargo 1.66.1 (ad779e08b 2023-01-10)
OS: Arch Linux
## What you did
1. Setup a basic bevy app.
2. Disabled unneeded features
```
[dependencies.bevy]
version = "0.9.1"
default-features = false
features = [
"bevy_winit",
"render",
"png",
"hdr",
"x11",
"filesystem_watcher",
]
```
3. Built for the `wasm32-unknown-emscripten` target
## What went wrong
Got the following error:
```
= note: error: undefined symbol: main/__main_argc_argv (referenced by top-level compiled C/C++ code)
warning: Link with `-sLLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`
warning: _main may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
warning: To build in STANDALONE_WASM mode without a main(), use emcc --no-entry
Error: Aborting compilation due to previous errors
emcc: error: '/usr/bin/node /usr/lib/emscripten/src/compiler.js /tmp/tmpgiqdmhmf.json' failed (returned 1)
error: could not compile `tracing-wasm` due to previous error
```
## Additional information
The app compiles fine under linux or `wasm32-unknown-unknown`
## Questions
1. Is there a way to disable the tracing component of bevy? I dont need it for this build and would like to unblock myself.
Contributor guide
Research direction
Reproduce the failure by building the minimal Bevy app with the listed disabled features for wasm32-unknown-emscripten, then inspect the tracing-wasm compilation path and the requested tracing feature configuration. Done means the same configuration builds successfully for the Emscripten target, or the issue documents a confirmed supported way to disable tracing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100