Compile on Stable Rust
nickbabcock opened this issue · 4 comments
Didn't see this documented, but this crate looks like it is nightly only.
Is there a plan to target stable Rust? I'm interested in swapping out the global allocator for an allocation heavy Wasm app.
Hi! Thanks for considering Talc.
Yep, nightly only indeed. (I think lib.rs figures it out automatically but I'll clarify the details in the ReadMe when I implement an update for this)
I think it should be fairly easy to make a stable subset of the API, which shouldn't affect usage for WASM at all. Hopefully I can get this sorted soon, but I'm very busy this week so I can't make a concrete commitment.
Alright, add talc = { version = "^3.1.0", default-features = false, features = ["lock_api"] }
to your Cargo.toml and you should be golden. The rest is in README_WASM file.
Let me know if anything explodes :)
Thanks for the quick release, I can confirm that it now works once I switched README's global_allocator
to be static
and not struct
. I might be missing something, though.
-struct ALLOCATOR: talc::TalckWasm = unsafe { talc::TalckWasm::new_global() };
+static ALLOCATOR: talc::TalckWasm = unsafe { talc::TalckWasm::new_global() };
No, you're absolutely correct. Thanks! I'll update the README