makspll / makspll/bevy_mod_scripting
Wasm compile error with rhai
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 649
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
Running trunk serve shows this doesn't seem to matter which features I use because I set default features false anyway and only use the rhai feature. Does bevy_mod_scripting rely on this bevy_asset feature?
2025-02-09T11:05:58.247667Z INFO 📦 starting build
Compiling bevy_asset v0.15.2
Compiling gilrs v0.11.0
Compiling accesskit_winit v0.23.1
Compiling bevy_state v0.15.2
error: The "file_watcher" feature for hot reloading does not work on Wasm.
Disable "file_watcher" when compiling to Wasm
--> /home/qat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_asset-0.15.2/src/io/mod.rs:2:1
|
2 | / compile_error!(
3 | | "The \"file_watcher\" feature for hot reloading does not work \
4 | | on Wasm.\nDisable \"file_watcher\" \
5 | | when compiling to Wasm"
6 | | );
| |_^
Compiling instant v0.1.13
Compiling thin-vec v0.2.13
Compiling rhai v1.21.0
error: could not compile `bevy_asset` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
2025-02-09T11:07:01.403243Z ERROR ❌ error
error from build pipeline
Caused by:
0: HTML build pipeline failed (1 errors), showing first
1: error from asset pipeline
2: running cargo build
3: error during cargo build execution
4: cargo call to executable 'cargo' with args: '["build", "--target=wasm32-unknown-unknown", "--manifest-path", "/h
ome/qat/tyconia/Cargo.toml"]' returned a bad status: exit status: 101
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with trunk serve and the Wasm cargo build command using the manifest path shown in the error. Inspect Cargo.toml and the resolved bevy_asset features, especially file_watcher; done means the build using only the rhai feature no longer triggers the Wasm compile error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100