Closed Boscop closed 4 years ago
@Boscop While the original mimalloc library compiles on WASM, the wrapper uses rust's libc
to do ffi calls. Unfortunately, there is no WASM target available for libc
. Check this out.
@octavonce Ah, right. It seems you're only using c_void
and size_t
from libc
, right?
Could you please use the types from std::os::raw
instead? Specifically c_void
. (And size_t
is always defined as usize
, so you can use that.)
It's more idiomatic to not depend on libc unless it's really necessary, I also switched my ffi crates to use those types.
It would be sad if these types would prevent this allocator from building for wasm..
@Boscop Sure, that makes sense
Not sure if this allocator is intended to also work for wasm, but in my frontend I need speed more than size (it's a UI for a desktop application), so I thought I'd try it.. But it fails to build for wasm: