alexcrichton/dlmalloc-rs

GlobalDlMalloc not found in version 0.2.4

hskang9 opened this issue · 4 comments

why

error[E0425]: cannot find value `GlobalDlmalloc` in crate `dlmalloc`
  --> engine/src/lib.rs:36:52
   |
36 | static ALLOC: dlmalloc::GlobalDlmalloc = dlmalloc::GlobalDlmalloc;

RUSTSEC recommends this cargo to be used. Could you write a guide on how to integrate?

angular-rust/yew-components#7

Hello @hskang9

I think you forgot to use the global feature in Cargo.toml:

dlmalloc = { version = "0.2.4", features = ["global"] }

and in libs.rs

static ALLOC: dlmalloc::GlobalDlmalloc = dlmalloc::GlobalDlmalloc;

works for me :)

Please @alexcrichton, close this issue