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 web build doesn't work #11

Open
jgarvin opened this issue Jun 20, 2020 · 2 comments
Open

Example web build doesn't work #11

jgarvin opened this issue Jun 20, 2020 · 2 comments

Comments

@jgarvin
Copy link

jgarvin commented Jun 20, 2020

Steps:

  1. clone repo
  2. cd example
  3. cargo build --release --target wasm32-unknown-unknown
  4. copy wasm file to example/html/
  5. copy this howler.js to example/html/
  6. basic-http-server .
  7. Visit in chrome Version 81.0.4044.138 (Official Build) (64-bit)

Get this error:

Error
An exception was thrown: CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0
@nsauzede
Copy link

nsauzede commented Apr 6, 2021

I just tried the same with the latest cargo (rustup) setup, and get this error instead :

   Compiling example v0.1.0 (/home/nico/perso/git/gate/example)
error[E0432]: unresolved import `super::mark_app_created_flag`
  --> gate/src/core/wasm/mod.rs:33:5
   |
33 | use super::mark_app_created_flag;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `mark_app_created_flag` in `core`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `gate`

To learn more, run the command again with --verbose.

I notice, though, that if I comment the two lines referencing mark_app_created_flag,
then the example builds fine.
But is this the correct way to fix the example WASM build ?

@SergiusIW
Copy link
Owner

@nsauzede thanks for bringing that to my attention. I accidentally broke the wasm build during a refactoring. The mark_app_created_flag function no longer exists. I've updated the latest master to remove those two lines.

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

3 participants