vecless

Crates.iovecless
lib.rsvecless
version0.3.0
created_at2025-07-06 14:20:24.743748+00
updated_at2025-07-07 10:38:23.553667+00
descriptionA minimal, Vec-free, singly linked list with Display support and ergonomic APIs.
homepagehttps://github.com/Pjdur/vecless
repositoryhttps://github.com/Pjdur/vecless
max_upload_size
id1740167
size25,461
Pjdur (Pjdur)

documentation

https://pjdur.github.io/vecless

README

vecless

vecless is a minimal, ergonomic, singly linked list implementation in Rust — no Vec required.

✨ Features

  • ✅ No Vec or heap-allocated arrays
  • ✅ Supports .add(...) with any iterable
  • ✅ Implements Display for clean, human-readable output
  • ✅ Iterator support for for loops and .iter()

🚀 Example

use vecless::List;

fn main() {
    let list = List::new().add(["a", "b", "c"]);
    println!("{}", list); // Output: [a, b, c]
}

Why Vecless?

Rust’s built-in Vec<T> is powerful and flexible — but it doesn’t implement the Display trait, which means you can’t print it with {}. Instead, you have to use the debug formatter {:?}:

let v = vec![1, 2, 3];
println!("{:?}", v); // [1, 2, 3]

vecless was created to:

  • Provide a list type that implements Display out of the box
  • Offer a lightweight, composable alternative to Vec for learning and experimentation
  • Help developers understand how linked lists work under the hood in Rust
  • Serve as a teaching tool or a minimal data structure for constrained environments

While not a replacement for Vec in performance-critical code, vecless is great for:

  • Educational projects
  • Functional-style list building
  • CLI tools or embedded contexts where simplicity matters

Want to contribute or suggest improvements? Open an issue or start a discussion!

Commit count: 0

cargo fmt