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

Prototype game no longer working in browser after adding legion #294

Open
freiguy1 opened this issue Jan 31, 2022 · 0 comments
Open

Prototype game no longer working in browser after adding legion #294

freiguy1 opened this issue Jan 31, 2022 · 0 comments

Comments

@freiguy1
Copy link

Hi there, I'm just playing around with some game dev. I have a new project hosted here https://gitlab.com/freiguy1/strands (look at branch legion for this code) which is very small, just a main.rs so far. We had it building and deploying to GitLab Pages when our only dependency was macroquad. Now I'm experimenting with Legion. Building & running locally works great, and the wasm32 targeted build is working, but when actually visiting the web page with the game, I'm seeing errors in the browser console:

WASM failed to load, probably incompatible gl.js version

TypeError: import object field '__wbindgen_placeholder__' is not an Object

In Cargo.toml I've tried both

[target.'cfg(target_arch = "wasm32")'.dependencies]
legion = { version = "0.4", default-features = false, features = ["codegen", "stdweb"]}

and

[target.'cfg(target_arch = "wasm32")'.dependencies]
legion = { version = "0.4", default-features = false, features = ["codegen", "wasm-bindgen"]}

And I've received the same error. You can see the build steps in the .gitlab-ci.yaml file. Perhaps we're missing a step now that we're including legion. I didn't see any additional instructions on the legion readme. Any advice?

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

1 participant