Open hiimsergey opened 1 year ago
I found a kind of hack to get it to compile:
cargo install lavagna
and let it fail (it spawns a /tmp/cargo-install\<random letters> directory)git clone
the source code and cd
into itBEVY_ASSET_PATH=assets/ CARGO_TARGET_DIR=/tmp/cargo-install\<random letters\> cargo install lavagna
embedded.add_asset(std::path::Path::new("fonts/FiraMono-Medium.ttf"), include_bytes!("/absolute/path/to/lavagna/assets/fonts/FiraMono-Medium.ttf"));
embedded.add_asset(std::path::Path::new("sprites/pen.png"), include_bytes!("/absolute/path/to/lavagna/assets/sprites/pen.png"));
I did this for both your and my project and it seemed to work, although I don't know how to use this information so that users can install the program normally.
Hi @hiimsergey, thanks for sharing this issue.
I've just tested it and I confirm that cargo install lavagna
gives this error:
error: failed to run custom build command for `bevy_embedded_assets v0.7.0`
Caused by:
process didn't exit successfully: `/tmp/cargo-installZgTg2e/release/build/bevy_embedded_assets-5842e00b13fe4b91/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed={}
cargo:rerun-if-env-changed=BEVY_ASSET_PATH
cargo:warning=Could not find asset folder, please specify its path with $BEVY_ASSET_PATH
--- stderr
thread 'main' panicked at 'No asset folder found', /home/alepez/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_embedded_assets-0.7.0/build.rs:111:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `lavagna v2.1.7`, intermediate artifacts can be found at `/tmp/cargo-installZgTg2e`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
But cargo install --path .
from a fresh clone of the last commit dd260dd seems to be ok.
I've also tried cargo clone lavagna
(https://crates.io/crates/cargo-clone) and cargo install --path .
from the downloaded directory and it seems to be fine.
I need more time to handle this issue, but if in the meanwhile you've find a solution, feel free to PR.
Any updates?
I think this is related to https://github.com/vleue/bevy_embedded_assets/issues/5
When executing cargo install lavagna
, dependencies are built first. bevy_embedded_assets
is expecting to find the assets folder, but when it is built, that folder does not exist yet.
I think cargo install lavagna
cannot be used to install this crate.
Describe the bug When performing
cargo install lavagna
, the compilation process fails. The bevy_embedded_assets can't find the assets folder.Full output, directly after
Compiling <dependency> v<version>
:To Reproduce Steps to reproduce the behavior:
cargo install lavagna
Expected behavior The log throws no errors and lavagna is installed at
~/.cargo/bin/lavagna
.Desktop (please complete the following information):
Side Note In my project, I have the same issue. I uploaded it to crates.io but can't
cargo install
, due to the same error messages, althoughcargo package --list
lists my assets folder.Thank you in advance.