Open tanis2000 opened 6 years ago
If I try to build for wasm32-unknown-emscripten using the following command:
wasm32-unknown-emscripten
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.com-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.com-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.com-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`.
This may also be fixed by the solution I proposed in #94. Otherwise, it's probably easiest to add as *const _ to all of the problematic lines.
as *const _
If I try to build for
wasm32-unknown-emscripten
using the following command:I get the following error: