MCPcopy Index your code
hub / github.com/archshift/dynstack

github.com/archshift/dynstack @v0.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.0 ↗ · + Follow
56 symbols 116 edges 3 files 19 documented · 34%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dynstack

A stack for trait objects that minimizes allocations

COMPATIBILITY NOTE: dynstack relies on an underspecified fat pointer representation. Though it isn't expected to change in the foreseeable future, this crate expects Rust 1.34's representation.

Usage

dynstack can mostly replace anywhere you'd use a stack, or a vector that doesn't require removal from its center.

let mut stack = DynStack::<Debug>::new();
dyn_push!(stack, "hello, world!");
dyn_push!(stack, 0usize);
dyn_push!(stack, [1, 2, 3, 4, 5, 6]);

for item in stack.iter() {
    println!("{:?}", item);
}

// prints:
//  "hello, world!"
//  0
//  [1, 2, 3, 4, 5, 6]

Extension points exported contracts — how you extend this code

Aligned (Interface)
(no doc) [4 implementers]
src/lib.rs
TestTrait (Interface)
(no doc) [2 implementers]
build.rs

Core symbols most depended-on inside this repo

iter
called by 11
src/lib.rs
get
called by 6
src/lib.rs
peek
called by 6
src/lib.rs
push
called by 5
src/lib.rs
pseudorecursive
called by 4
benches/comparisons.rs
layout
called by 4
src/lib.rs
get_mut
called by 3
src/lib.rs
decomp_fat
called by 2
build.rs

Shape

Function 25
Method 21
Class 8
Interface 2

Languages

Rust100%

Modules by API surface

src/lib.rs41 symbols
benches/comparisons.rs8 symbols
build.rs7 symbols

For agents

$ claude mcp add dynstack \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact