foundations
AGENTS.md1.7k starsChanged 2 months agoBSD-3-ClauseView on GitHub
- UserSpan::deferred() creates a stable request root that can be captured by telemetry contexts before activate() makes the sampling decision. - TelemetryContext::with_user_span() attaches an explicit UserSpan without changing ambient scope; the returned context and handle share the same underlying span. - A deferred root is an inactive span in a shared RwLock. Activation replaces it under the write lock; the first active span wins, while inactive results remain retryable. - Recording and children created before activation are inactive. Contexts that…
Trending
More talk lately.thin dataabout the whole repository
Who's talking about cloudflare/foundations
- A Hacker News story“Foundations open source Rust service foundation library by Cloudflare”Hacker News · Feb 5, 2024 · 14 points
- A Hacker News story“Cloudflare's Rust service foundations library”Hacker News · Jan 31, 2024 · 1 points
- terlan-lang/terlan“Bump foundations from 5.10.2 to 5.10.3”GitHub · Oct 4, 2026
- arjunprashar736/quic_prof“Update foundations requirement from 4 to 5”GitHub · Sep 10, 2025
- meetsmore/nittei“feat: use jemalloc in all cases”GitHub · Feb 5, 2025
The biggest 5 of 7 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 7
Talked about on GitHub and Hacker News (7 times).
On GitHub · 5
- Oct 4, 2026Bump foundations from 5.10.2 to 5.10.3 — terlan-lang/terlan0 reactions
- Sep 10, 2025Update foundations requirement from 4 to 5 — arjunprashar736/quic_prof0 reactions
- Feb 5, 2025feat: use jemalloc in all cases — meetsmore/nittei0 reactions
- Sep 25, 2024Add tracing and monitoring — TeamSolidCH/monorepo0 reactions
- Feb 1, 2024Foundations — danny-yamamoto/roughsketch0 reactions
On Hacker News · 2
- Feb 5, 2024Foundations open source Rust service foundation library by Cloudflare14 points
- Jan 31, 2024Cloudflare's Rust service foundations library1 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 6
Test single: cargo nextest run <test_name> or cargo nextest run --test <file> <test_name>
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Build & Test Commands
- Build:
cargo build - Test all:
cargo nextest run - Test single:
cargo nextest run <test_name>orcargo nextest run --test <file> <test_name> - Clippy:
cargo clippy --all-targets -- -D warnings -D unreachable_pub -D clippy::await_holding_lock -D clippy::clone_on_ref_ptr - Format:
cargo fmt --all - Lint fix:
./scripts/lint-fix.sh - Feature check:
cargo hack check --feature-powerset --no-dev-deps --depth 1
Code Style
- Rust 2021 edition, use
rustfmtdefaults - Imports: group std, external crates, then internal modules; use
crate::for internal imports - Types: prefer
Box<dyn Error + Send + Sync>for generic errors; useanyhow::Resultfor bootstrap errors - Naming: snake_case for functions/variables, PascalCase for types, SCREAMING_SNAKE for constants
- Errors: use
BootstrapResult<T>(anyhow) for initialization,Result<T>(boxed error) for runtime - Docs: add
///doc comments for public items;#![warn(missing_docs)]is enabled - Feature flags: wrap platform/optional code with
#[cfg(feature = "...")] - No
openssl/openssl-sys- useboring,ring, orrustlsinstead
User Tracing
UserSpan::deferred()creates a stable request root that can be captured by telemetry contexts beforeactivate()makes the sampling decision.TelemetryContext::with_user_span()attaches an explicitUserSpanwithout changing ambient scope; the returned context and handle share the same underlying span.- A deferred root is an inactive span in a shared
RwLock. Activation replaces it under the write lock; the first active span wins, while inactive results remain retryable. - Recording and children created before activation are inactive. Contexts that captured the root itself observe a later activation.
- A sampled span remains protected by the same non-poisoning
RwLockused by eager user spans. - User trace resources use
UserTracingSettings::service_nameand intentionally omit the internal service version.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

