Sample
anstyle-wincon 3.0.11: anstyle_wincon::WinconStream
Verified sample for cargo anstyle-wincon 3.0.11: anstyle_wincon::WinconStream. The contract ran on rust 1 · linux alpine/x64 · docker and passed.
sha256:0269be61f096b4642bff96b829b8a91be221a127ca06a3aecea055d64cc776ea
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 · 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-09-19 |
Case
HOW- Goal
- verify pkg:cargo/anstyle-wincon@3.0.11
- Packages
- Symbols
-
- anstyle_wincon::WinconStream
- Created
- 2026-09-19T00:03:34Z
Contract
- assert WinconStream::write_colored writes data to Vec<u8> buffer and returns written length
- assert WinconStream::write_colored appends data on subsequent calls
- assert WinconStream is implemented for Box<dyn std::io::Write>
Files
- Cargo.lock
- Cargo.toml
- PROMPT.md
- csx.json
- spec.json
- src/main.rs
Source
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "anstyle"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
[[package]]
name = "anstyle-wincon"
version = "3.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
"windows-sys",
]
[[package]]
name = "once_cell_polyfill"
version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
[[package]]
name = "sample"
version = "0.1.0"
dependencies = [
"anstyle-wincon",
]
[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-sys"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link",
]
[package]
name = "sample"
version = "0.1.0"
edition = "2021"
[dependencies]
anstyle-wincon = "=3.0.11"
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 pkg:cargo/anstyle-wincon@3.0.11
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:cargo/anstyle-wincon@3.0.11
Demonstrate these symbols/APIs:
- anstyle_wincon::WinconStream
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:de0dd0ce00807202ee20e58fc20685e763dcffd64936ea90deb54f684f3a4c09","contract":["assert WinconStream::write_colored writes data to Vec\u003cu8\u003e buffer and returns written length","assert WinconStream::write_colored appends data on subsequent calls","assert WinconStream is implemented for Box\u003cdyn std::io::Write\u003e"],"goal":"verify pkg:cargo/anstyle-wincon@3.0.11","kind":"HOW","packages":["pkg:cargo/anstyle-wincon@3.0.11"],"schemaVersion":1,"symbols":["anstyle_wincon::WinconStream"]},"contractCommand":["cargo","run","--offline"],"environment":{"arch":"x64","ecosystem":"cargo","libc":"musl","os":"linux","packageManager":"cargo","schemaVersion":1},"license":"MIT-0","packages":["pkg:cargo/anstyle-wincon@3.0.11"],"schemaVersion":1,"subject":"pkg:cargo/anstyle-wincon@3.0.11","symbols":["anstyle_wincon::WinconStream"],"verifierAdapter":"cargo@1"}
{
"schemaVersion": 1,
"goal": "verify pkg:cargo/anstyle-wincon@3.0.11",
"kind": "HOW",
"packages": [
"pkg:cargo/anstyle-wincon@3.0.11"
],
"symbols": [
"anstyle_wincon::WinconStream"
]
}
use anstyle_wincon::WinconStream;
fn main() {
// 1. Verify WinconStream write_colored on concrete Vec<u8> buffer
let mut buffer: Vec<u8> = Vec::new();
let written = buffer
.write_colored(None, None, b"contract payload")
.expect("write_colored failed");
assert_eq!(written, 16);
assert_eq!(buffer, b"contract payload");
// 2. Verify subsequent write_colored appends data correctly
let written_more = buffer
.write_colored(None, None, b" extended")
.expect("extended write_colored failed");
assert_eq!(written_more, 9);
assert_eq!(buffer, b"contract payload extended");
// 3. Verify WinconStream dynamic dispatch through Box<dyn std::io::Write>
let mut writer: Box<dyn std::io::Write> = Box::new(Vec::new());
let written_dyn = writer
.write_colored(None, None, b"dynamic dispatch")
.expect("dynamic write_colored failed");
assert_eq!(written_dyn, 16);
println!("All contract assertions passed successfully.");
}
Origin Seeder
anonymous