rustio rustio.net
43

prompt-token-counter

v0.1.0 Experimental

Approximate token counts for LLM messages, system prompts, and tools. Zero-config chars/4 heuristic, BYO tokenizer, content-block aware (text/image/tool_use/tool_result/document). One serde_json dep.

MIT OR Apache-2.0 Edition 2021 MSRV 1.74
API bindingsValue formatting #openai#tokens#llm#anthropic#context-window

Quick Verdict

  • !Pre-1.0: API may have breaking changes
  • โœ“Tiny footprint (13KB, 2 deps)
  • โœ“Permissive license (MIT OR Apache-2.0)

Security

Checking security advisories...
Downloads
20
Dependents
0
Releases
1
Size
13KB

Deep Insights

๐Ÿ‘ค
Prolific maintainer

The primary maintainer publishes 176 crates. This suggests deep Rust expertise and long-term commitment to the ecosystem.

๐Ÿชถ
Minimal dependencies

Only 2 direct dependencies. Lean dependency tree means faster builds and lower supply chain risk.

๐Ÿ“
Compact crate

At 12KB, prompt-token-counter is lightweight. Small crate size correlates with focused, well-scoped functionality.

Health Breakdown

Maintenance 6/25

Recency, release consistency, active ratio

Quality 14/25

Yanked ratio, deps, size, maturity, features

Community 6/20

Reverse deps, ownership, ecosystem

Popularity 2/15

Downloads, momentum, growth trend

Documentation 15/15

Docs, repo, license, metadata

Download Trend

Daily downloads ยท last 90 days
0/day avg
08/229/99/2710/1511/211/19

Version Adoption

v0.1.0
100%

Release Timeline

1 releasessince 2026
J
F
M
A
M
J
J
A
S
O
N
D
2026
1
Less
More

README

Loading README...

Maintainers

Dependencies
2
direct dependencies
Dependents
0
crates depend on prompt-token-counter

Similar Crates