Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GlobalDlMalloc not found in version 0.2.4 #31

Closed
hskang9 opened this issue Feb 16, 2023 · 4 comments
Closed

GlobalDlMalloc not found in version 0.2.4 #31

hskang9 opened this issue Feb 16, 2023 · 4 comments

Comments

@hskang9
Copy link

hskang9 commented Feb 16, 2023

why

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

hskang9 commented Feb 16, 2023

@alexcrichton

@hskang9
Copy link
Author

hskang9 commented Feb 16, 2023

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

angular-rust/yew-components#7

@erwanvivien
Copy link

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 :)

@erwanvivien
Copy link

Please @alexcrichton, close this issue

@hskang9 hskang9 closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants