bevyengine / bevyengine/bevy

`embedded_asset!` does not work in multi-crate workspace + release build

Open
#14,718 3 comments 0 reactions 0 assignees View on GitHub
A-Assets C-Bug D-Straightforward S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.14.1

## Relevant system information

```
Arch Linux v6.9.9-arch1-1

cargo 1.82.0-nightly (94977cb1f 2024-08-06)

AdapterInfo { name: "AMD Radeon RX 570 Series (RADV POLARIS10)", vendor: 4098, device: 26591, device_type: DiscreteGpu, driver: "radv", driver_info: "Mesa 24.1.3-arch1.1", backend: Vulkan }
```

## What you did

- Used `embedded_asset!` for a splash screen image in the member `foo` of a multi-crate workspace: https://github.com/benfrankel/bevy_jam_template/blob/c257d9da92859a1f11a42ea7da578d90e6a642d9/foo/src/screen/splash.rs#L20
- Ran `cargo run` (dev build) and `cargo run --no-default-features --release` (release build)

## What went wrong

Dev build was fine, release build failed to load the splash screen:

```
2024-08-12T08:18:26.397120Z ERROR bevy_asset::server: Path not found: /foo/screen/splash/splash.png
```

## Additional information

This issue seems related: https://github.com/bevyengine/bevy/issues/10575

However, that's about `embedded_watcher` not working while `embedded_asset!` _does_ work, and there's no mention of dev vs. release builds having different outcomes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.