-
Notifications
You must be signed in to change notification settings - Fork 3
Description
issue identified by me, description ~90% generated by Grok ::)
This README provides the following usage example for adding and using the allocator in Rust code:
cargo add smallocand
use smalloc::Smalloc;
#[global_allocator]
static ALLOC: Smalloc = Smalloc::new();However, the published crate on crates.io is named smmalloc (see https://crates.io/crates/smmalloc), not smalloc.
This mismatch will cause confusion and errors for users attempting to follow the instructions directly:
cargo add smalloc will import the incorrect crate.
use smalloc::Smalloc; will not compile when depending on the actual smalloc crate.
Suggested fix:
Update the crate to make use of a name that does not conflict with existing crates, and does not have redundant/confusing syntax.
One possibility is
simpalloc, which is short for simple-allocator, currently unused, and funny.
cargo add simpalloc
use simpalloc::Simpalloc;
#[global_allocator]
static ALLOC: Simpalloc = Simpalloc::new();
If the crate was intentionally renamed to simpalloc (e.g., due to name conflicts), adding a short note explaining the rename would also help avoid confusion.