purpleprotocol / mimalloc_rust

A Rust wrapper over Microsoft's MiMalloc memory allocator
MIT License
486 stars 42 forks source link

WASM? #36

Open indo-dev-0 opened 3 years ago

indo-dev-0 commented 3 years ago

Any chance of getting an example of using MiMalloc to replace wee_alloc?

Kevingislason commented 3 years ago

I could use this as well

Currently get this error when I run wasm-pack build

thread 'main' panicked at 'target family not set: NotPresent', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/libmimalloc-sys-0.1.21/build.rs:46:44
theduke commented 2 years ago

Seconding this.

Rust WASM currently uses a dlmalloc port, which isn't exactly the best allocator. mimalloc would probably help speed up allocation heavy wasm code quite a bit.