Creating a project with lodepng as a dependency and building with --target wasm32-unknown-unknown yields the following errors:
Compiling lodepng v2.5.0
error[E0425]: cannot find function `malloc` in crate `libc`
--> /home/carado/.cargo/registry/src/github.com-1ecc6299db9ec823/lodepng-2.5.0/src/rustimpl.rs:53:15
|
53 | libc::malloc(size) as *mut _
| ^^^^^^ not found in `libc`
error[E0425]: cannot find function `realloc` in crate `libc`
--> /home/carado/.cargo/registry/src/github.com-1ecc6299db9ec823/lodepng-2.5.0/src/rustimpl.rs:58:11
|
58 | libc::realloc(ptr as *mut _, size) as *mut _
| ^^^^^^^ not found in `libc`
|
help: possible candidate is found in another module, you can import it into scope
|
16 | use std::alloc::realloc;
|
error[E0425]: cannot find function `free` in crate `libc`
--> /home/carado/.cargo/registry/src/github.com-1ecc6299db9ec823/lodepng-2.5.0/src/rustimpl.rs:62:11
|
62 | libc::free(ptr as *mut _)
| ^^^^ not found in `libc`
error[E0425]: cannot find function `free` in crate `libc`
--> /home/carado/.cargo/registry/src/github.com-1ecc6299db9ec823/lodepng-2.5.0/src/lib.rs:818:11
|
818 | libc::free(ptr as *mut _);
| ^^^^ not found in `libc`
error: aborting due to 4 previous errors
Is using the system's malloc and free really necessary ?
Creating a project with lodepng as a dependency and building with
--target wasm32-unknown-unknown
yields the following errors:Is using the system's malloc and free really necessary ?