Giter Club home page Giter Club logo

Comments (4)

alepez avatar alepez commented on August 22, 2024 1

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.

from lavagna.

hiimsergey avatar hiimsergey commented on August 22, 2024

I found a kind of hack to get it to compile:

  1. cargo install lavagna and let it fail (it spawns a /tmp/cargo-install<random letters> directory)
  2. git clone the source code and cd into it
  3. BEVY_ASSET_PATH=assets/ CARGO_TARGET_DIR=/tmp/cargo-install\<random letters\> cargo install lavagna
  4. The compiler throws and error message and points to /tmp/cargo-install<random letters>/release/build/bevy_embedded_assets-<random hash>/out/include_all_assets.rs
    Delete the body of the only function there and replace it with:
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"));
  1. Run step 3 again

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.

from lavagna.

hiimsergey avatar hiimsergey commented on August 22, 2024

Any updates?

from lavagna.

alepez avatar alepez commented on August 22, 2024

I think this is related to vleue/bevy_embedded_assets#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.

from lavagna.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.