Skip to content

Typo: README usage instructions refer to incorrect smalloc crate; actual crate is smmalloc #2

@hard-nett

Description

@hard-nett

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 smalloc

and

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions