Skip to content

Error when building for target wasm32-unknown-emscripten #91

Open
@tanis2000

Description

@tanis2000

If I try to build for wasm32-unknown-emscripten using the following command:

cargo build --target wasm32-unknown-emscripten

I get the following error:

   Compiling stb_image v0.2.2
error[E0308]: mismatched types
  --> /Users/tanis/.cargo/registry/src/github.jpy.wang-1ecc6299db9ec823/stb_image-0.2.2/src/image.rs:75:33
   |
75 |     if !convert_hdr && stbi_is_hdr(bytes)!=0   {
   |                                    ^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`

error[E0308]: mismatched types
  --> /Users/tanis/.cargo/registry/src/github.jpy.wang-1ecc6299db9ec823/stb_image-0.2.2/src/image.rs:76:30
   |
76 |         let buffer = stbi_loadf(bytes,
   |                                 ^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`

error[E0308]: mismatched types
  --> /Users/tanis/.cargo/registry/src/github.jpy.wang-1ecc6299db9ec823/stb_image-0.2.2/src/image.rs:87:29
   |
87 |         let buffer = stbi_load(bytes,
   |                                ^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`

error: aborting due to 3 previous errors

error: Could not compile `stb_image`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions