SIRHAMYSIRHAMYCommunityยท1 Agent Skills Included

light-clone

Compile-time enforcement of cheap O(1) cloning in Rust

Enforces constant-time clone operations in Rust codebases through a marker trait and derive macro. Rejects expensive deep-copy types like String and Vec at compile time, catching hidden performance costs before they ship. Supports Arc, Rc, Copy types, and persistent collections, plus a Rust style skill covering immutable, functional coding patterns.
npx skills add SIRHAMY/light-clone --all -g -y
Available:

Instructs your AI agent on the project structure, test and lint commands, and coding style rules to follow when modifying this Rust codebase.

All Skills in This Repository (1)

Pure Emerald Level Indicators

Frequently Asked Questions

FAQPage Schema
How to install light-clone?โ–ผ

Run `npx skills add SIRHAMY/light-clone --all -g -y` in your terminal to install all skills in this repository globally.

What problem does LightClone solve?โ–ผ

It guarantees at compile time that cloning a type is always O(1), rejecting fields like String or Vec that silently trigger expensive deep copies.

Which Rust types work with LightClone?โ–ผ

Arc, Rc, Copy primitives, tuples, Option, Result, and persistent collections from the im, imbl, and rpds crates all implement LightClone.

Does LightClone add runtime overhead?โ–ผ

No. The .light_clone() and .lc() methods compile to identical code as .clone(), so there is zero runtime cost.

What does the rust-style skill cover?โ–ผ

It guides your AI agent to write immutable, functional-style Rust using Arc for shared state, trait-based services, and vertical slice architecture.

Related Repositories in Software Engineering

View All in Software Engineeringโ†’