Sample
backtrace 0.3.76: backtrace::trace
Verified sample for cargo backtrace 0.3.76: backtrace::trace. The contract ran on rust 1 · linux alpine/x64 · docker and passed.
sha256:4938492fa86d9b2964736ac78e8884c0ee29aa94eff58343f67c5dd990d7753e
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 1
- Signing keys that built it
- 1
Declared environment
linux · alpine · musl x64 cargo
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| rust 1 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · cargo@1rust:1-alpine@sha256:a10e64dd139b… |
2026-10-09 |
Case
HOW- Goal
- verify backtrace::trace in pkg:cargo/backtrace@0.3.76
- Packages
- Symbols
-
- backtrace::trace
- Created
- 2026-10-09T08:17:02Z
Contract
- backtrace::trace yields stack frames to the provided closure
- backtrace::trace yields frames with valid non-null instruction pointer
- backtrace::trace terminates iteration early when closure returns false
- backtrace::trace captures deeper stack during nested function calls
Files
- Cargo.lock
- Cargo.toml
- PROMPT.md
- csx.json
- spec.json
- src/lib.rs
- test/contract.rs
Source
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "addr2line"
version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
dependencies = [
"gimli",
]
[[package]]
name = "adler2"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]
name = "backtrace"
version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6"
dependencies = [
"addr2line",
"cfg-if",
"libc",
"miniz_oxide",
"object",
"rustc-demangle",
"windows-link",
]
[[package]]
name = "cfg-if"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
[[package]]
name = "gimli"
version = "0.32.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
[[package]]
name = "libc"
version = "0.2.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
[[package]]
name = "memchr"
version = "2.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
[[package]]
name = "miniz_oxide"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
dependencies = [
"adler2",
]
[[package]]
name = "object"
version = "0.37.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
dependencies = [
"memchr",
]
[[package]]
name = "rustc-demangle"
version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb"
[[package]]
name = "sample-backtrace"
version = "1.0.0"
dependencies = [
"backtrace",
]
[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[package]
name = "sample-backtrace"
version = "1.0.0"
edition = "2021"
publish = false
[dependencies]
backtrace = "=0.3.76"
[[bin]]
name = "contract"
path = "test/contract.rs"
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify backtrace::trace in pkg:cargo/backtrace@0.3.76
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:cargo/backtrace@0.3.76
Demonstrate these symbols/APIs:
- backtrace::trace
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:04f3a9f5c6db4c12db902c67cf54b4c166aaacbc8324bc11bcf28d4aaa9b2630","contract":["backtrace::trace yields stack frames to the provided closure","backtrace::trace yields frames with valid non-null instruction pointer","backtrace::trace terminates iteration early when closure returns false","backtrace::trace captures deeper stack during nested function calls"],"goal":"verify backtrace::trace in pkg:cargo/backtrace@0.3.76","kind":"HOW","packages":["pkg:cargo/backtrace@0.3.76"],"schemaVersion":1,"symbols":["backtrace::trace"]},"contractCommand":["cargo","run","--offline"],"environment":{"arch":"x64","distro":"alpine","ecosystem":"cargo","libc":"musl","os":"linux","packageManager":"cargo","schemaVersion":1},"license":"MIT-0","packages":["pkg:cargo/backtrace@0.3.76"],"schemaVersion":1,"subject":"pkg:cargo/backtrace@0.3.76","symbols":["backtrace::trace"],"verifierAdapter":"cargo@1"}
{
"schemaVersion": 1,
"goal": "verify backtrace::trace in pkg:cargo/backtrace@0.3.76",
"kind": "HOW",
"packages": [
"pkg:cargo/backtrace@0.3.76"
],
"symbols": [
"backtrace::trace"
]
}
//! Clean-room verification sample for backtrace.
pub use backtrace::*;
use backtrace::trace;
fn nested_call(target_depth: usize, current_depth: usize, ips: &mut Vec<*mut core::ffi::c_void>) {
if current_depth < target_depth {
nested_call(target_depth, current_depth + 1, ips);
} else {
trace(|frame| {
ips.push(frame.ip());
true
});
}
}
fn main() {
// 1. backtrace::trace yields stack frames to the provided closure
let mut frames = Vec::new();
trace(|frame| {
frames.push(frame.ip());
true
});
assert!(!frames.is_empty(), "Expected at least one frame from trace");
// 2. backtrace::trace yields frames with valid non-null instruction pointer
assert!(
frames.iter().any(|&ip| !ip.is_null()),
"At least one stack frame should have a non-null instruction pointer"
);
// 3. backtrace::trace terminates iteration early when closure returns false
let mut early_stop_count = 0;
trace(|_frame| {
early_stop_count += 1;
false
});
assert_eq!(
early_stop_count, 1,
"Trace should have stopped after exactly one frame when closure returns false"
);
// 4. backtrace::trace captures deeper stack during nested function calls
let mut nested_ips = Vec::new();
nested_call(5, 0, &mut nested_ips);
assert!(
nested_ips.len() >= 5,
"Nested call stack should capture multiple frames (got {})",
nested_ips.len()
);
println!("All backtrace::trace contract assertions passed successfully.");
}
Origin Seeder
anonymous