You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix invalid artifact directory when customizing target (#481)
# Objective
The Bevy CLI allows you to configure a custom compilation target in
`Cargo.toml`:
```toml
[package.metadata.bevy_cli.web]
target = "wasm32v1-none"
```
However, `bevy run web` doesn't work with this configuration, because it
searches for the Wasm binary in the `wasm32-unknown-unknown` target
folder.
# Solution
The cause of this problem is that we have to run the binary selection
_before_ loading the `Cargo.toml` config, to know which package to pull
the config from.
But the config can then alter the contents of the `BinTarget`, most
notably the `artifact_directory`.
As a fix, we run the bin target selection again after loading the
config, which fixes the problem.
# Testing
You can test via the [`no_std` package in the
bevy_complex_repo](https://github.com/TimJentzsch/bevy_complex_repo/tree/main/no_std).
It doesn't fully work yet, but at least it should compile now without an
error.
0 commit comments