Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example doesn't build #4

Closed
remram44 opened this issue Nov 17, 2020 · 5 comments
Closed

Example doesn't build #4

remram44 opened this issue Nov 17, 2020 · 5 comments

Comments

@remram44
Copy link

remram44 commented Nov 17, 2020

$ cargo build --release --example sprite --target wasm32-unknown-unknown
...
   Compiling bevy_internal v0.3.0 (https://github.com/bevyengine/bevy#db2d20ec)
   Compiling bevy v0.3.0 (https://github.com/bevyengine/bevy#db2d20ec)
   Compiling bevy_webgl2 v0.3.0 (/tmp/bevy_webgl2)
error[E0432]: unresolved import `bevy::ecs::IntoThreadLocalSystem`
  --> src/lib.rs:16:29
   |
16 | use bevy::ecs::{IntoSystem, IntoThreadLocalSystem, Resources, World};
   |                             ^^^^^^^^^^^^^^^^^^^^^
   |                             |
   |                             no `IntoThreadLocalSystem` in `ecs`
   |                             help: a similar name exists in the module: `ThreadLocalSystemFn`

error[E0599]: no method named `thread_local_system` found for opaque type `impl for<'r, 's> FnMut<(&'r mut World, &'s mut Resources)>` in the current scope
  --> src/lib.rs:90:38
   |
90 |                 handle_events_system.thread_local_system(),
   |                                      ^^^^^^^^^^^^^^^^^^^ method not found in `impl for<'r, 's> FnMut<(&'r mut World, &'s mut Resources)>`
   |
   = note: `handle_events_system` is a function, perhaps you wish to call it

error[E0599]: no method named `thread_local_system` found for opaque type `impl for<'r, 's> FnMut<(&'r mut World, &'s mut Resources)>` in the current scope
  --> src/lib.rs:92:56
   |
92 |             .add_system_to_stage(RENDER, render_system.thread_local_system())
   |                                                        ^^^^^^^^^^^^^^^^^^^ method not found in `impl for<'r, 's> FnMut<(&'r mut World, &'s mut Resources)>`
   |
   = note: `render_system` is a function, perhaps you wish to call it

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `bevy_webgl2`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Building on Linux, rustc nightly 1.50.0 2020-11-15

@mrk-its
Copy link
Owner

mrk-its commented Nov 17, 2020

It is because of latest changes in bevy's master and lack of specific bevy rev in dependencies - it should work now.

@remram44
Copy link
Author

It works after ebd7ace, thanks! I ran the examples, and I'm really impressed 🤩

@dmitrykolesnikovich
Copy link

macbook:bevy_webgl2 dmitrykolesnikovich$ cargo make example sprite
[cargo-make] INFO - cargo make 0.35.13
[cargo-make] INFO - Project: bevy_webgl2
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: example
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "rustup" "target" "install" "wasm32-unknown-unknown"
info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
[cargo-make] INFO - Execute Command: "cargo" "build" "--target" "wasm32-unknown-unknown" "--example" "sprite"
   Compiling ash v0.34.0+1.2.203
   Compiling bevy_ecs_macros v0.8.0-dev (https://github.com/bevyengine/bevy#772d1523)
   Compiling bevy_derive v0.8.0-dev (https://github.com/bevyengine/bevy#772d1523)
   Compiling bevy_render_macros v0.8.0-dev (https://github.com/bevyengine/bevy#772d1523)
   Compiling bevy_encase_derive v0.8.0-dev (https://github.com/bevyengine/bevy#772d1523)
error[E0432]: unresolved import `libloading::Library`
  --> /Users/dmitrykolesnikovich/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.34.0+1.2.203/src/entry.rs:16:5
   |
16 | use libloading::Library;
   |     ^^^^^^^^^^^^^^^^^^^ no `Library` in the root

   Compiling naga v0.8.5
error[E0425]: cannot find value `LIB_PATH` in this scope
   --> /Users/dmitrykolesnikovich/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.34.0+1.2.203/src/entry.rs:103:25
    |
103 |         Self::load_from(LIB_PATH)
    |                         ^^^^^^^^ not found in this scope

   Compiling uuid v1.1.2
   Compiling bevy_utils v0.8.0-dev (https://github.com/bevyengine/bevy#772d1523)
   Compiling bevy_reflect v0.8.0-dev (https://github.com/bevyengine/bevy#772d1523)
   Compiling async-executor v1.4.1
   Compiling bevy_tasks v0.8.0-dev (https://github.com/bevyengine/bevy#772d1523)
error[E0282]: type annotations needed
   --> /Users/dmitrykolesnikovich/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.34.0+1.2.203/src/entry.rs:149:25
    |
149 |             _lib_guard: None,
    |                         ^^^^ cannot infer type for type parameter `T` declared on the enum `Option`

   Compiling bevy_ecs v0.8.0-dev (https://github.com/bevyengine/bevy#772d1523)
Some errors have detailed explanations: E0282, E0425, E0432.
For more information about an error, try `rustc --explain E0282`.
error: could not compile `ash` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
[cargo-make] ERROR - Error while executing command, exit code: 101
[cargo-make] WARN - Build Failed.

@dmitrykolesnikovich
Copy link

Does not build again.

@mockersf
Copy link
Contributor

mockersf commented Jun 11, 2022

bevy_webgl2 is not supposed to work with Bevy since the 0.6. Bevy can now directly render in WebGL2, no need for a plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants