Ejemplo
wasm-bindgen-shared 0.2.130: wasm_bindgen_shared::SCHEMA_VERSION
Muestra verificada para cargo wasm-bindgen-shared 0.2.130: wasm_bindgen_shared::SCHEMA_VERSION. El contrato se ejecutó en rust 1 · linux alpine/x64 · docker…
sha256:55559f50e7d6b0f43b644030d53b1022b60c99f357fa16581ba4d8a91c3675e5
Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido.
Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas.
MIT-0
Evidencia de ejecución
El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.
- Base de evidencia
- Contrato firmado aprobado
- Recibos de verificación
- 1
- Claves de firma que lo compilaron
- 1
Entorno declarado
linux · alpine · musl x64 cargo
Entornos de las ejecuciones de verificación
| Entorno | Contrato | Etapas | Ejecución |
|---|---|---|---|
| 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-11-23 |
Caso
HOW- Objetivo
- verify wasm_bindgen_shared::SCHEMA_VERSION in pkg:cargo/wasm-bindgen-shared@0.2.130
- Paquetes
- Símbolos
-
- wasm_bindgen_shared::SCHEMA_VERSION
- Creado
- 2026-11-23T14:51:32Z
Contrato
- wasm_bindgen_shared::SCHEMA_VERSION is a &'static str constant usable in const contexts
- wasm_bindgen_shared::SCHEMA_VERSION equals "0.2.130" for pkg:cargo/wasm-bindgen-shared@0.2.130
- wasm_bindgen_shared::SCHEMA_VERSION parses as three numeric semver segments (0, 2, 130) and supports exact-string schema matching
- wasm_bindgen_shared::version() starts with wasm_bindgen_shared::SCHEMA_VERSION
Archivos
- Cargo.lock
- Cargo.toml
- PROMPT.md
- csx.json
- spec.json
- test/contract.rs
Código fuente
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "sample-wasm-bindgen-shared-schema-version"
version = "0.1.0"
dependencies = [
"wasm-bindgen-shared",
]
[[package]]
name = "unicode-ident"
version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.130"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
dependencies = [
"unicode-ident",
]
[package]
name = "sample-wasm-bindgen-shared-schema-version"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "contract"
path = "test/contract.rs"
[dependencies]
wasm-bindgen-shared = "=0.2.130"
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 wasm_bindgen_shared::SCHEMA_VERSION in pkg:cargo/wasm-bindgen-shared@0.2.130
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:cargo/wasm-bindgen-shared@0.2.130
Demonstrate these symbols/APIs:
- wasm_bindgen_shared::SCHEMA_VERSION
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:09bd3ef72e2a7cd6f8d816af3f4c3c5d32c262fe2ecfea66a1d3bbfb85e57035","contract":["wasm_bindgen_shared::SCHEMA_VERSION is a \u0026'static str constant usable in const contexts","wasm_bindgen_shared::SCHEMA_VERSION equals \"0.2.130\" for pkg:cargo/wasm-bindgen-shared@0.2.130","wasm_bindgen_shared::SCHEMA_VERSION parses as three numeric semver segments (0, 2, 130) and supports exact-string schema matching","wasm_bindgen_shared::version() starts with wasm_bindgen_shared::SCHEMA_VERSION"],"goal":"verify wasm_bindgen_shared::SCHEMA_VERSION in pkg:cargo/wasm-bindgen-shared@0.2.130","kind":"HOW","packages":["pkg:cargo/wasm-bindgen-shared@0.2.130"],"schemaVersion":1,"symbols":["wasm_bindgen_shared::SCHEMA_VERSION"]},"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/wasm-bindgen-shared@0.2.130"],"schemaVersion":1,"subject":"pkg:cargo/wasm-bindgen-shared@0.2.130","symbols":["wasm_bindgen_shared::SCHEMA_VERSION"],"verifierAdapter":"cargo@1"}
{
"schemaVersion": 1,
"goal": "verify wasm_bindgen_shared::SCHEMA_VERSION in pkg:cargo/wasm-bindgen-shared@0.2.130",
"kind": "HOW",
"packages": [
"pkg:cargo/wasm-bindgen-shared@0.2.130"
],
"symbols": [
"wasm_bindgen_shared::SCHEMA_VERSION"
]
}
use wasm_bindgen_shared::{version, SCHEMA_VERSION};
const EXPORTED_SCHEMA_VERSION: &'static str = SCHEMA_VERSION;
const EXPORTED_SCHEMA_LEN: usize = SCHEMA_VERSION.len();
fn verify_schema_matches(received: &str) -> Result<(), String> {
match received {
SCHEMA_VERSION => Ok(()),
other => Err(format!(
"schema version mismatch: expected {SCHEMA_VERSION}, got {other}"
)),
}
}
fn main() {
// 1. Constant usability and exact value for wasm-bindgen-shared@0.2.130.
assert_eq!(EXPORTED_SCHEMA_VERSION, "0.2.130");
assert_eq!(SCHEMA_VERSION, "0.2.130");
assert_eq!(EXPORTED_SCHEMA_LEN, "0.2.130".len());
// 2. Three-segment numeric semver structure.
let parts: Vec<u32> = SCHEMA_VERSION
.split('.')
.map(|part| {
part.parse::<u32>()
.expect("SCHEMA_VERSION segment must be numeric")
})
.collect();
assert_eq!(parts, vec![0, 2, 130]);
// 3. Exact-string schema compatibility check (matching vs mismatched).
assert!(verify_schema_matches("0.2.130").is_ok());
let err = verify_schema_matches("0.2.129").unwrap_err();
assert!(err.contains("0.2.130") && err.contains("0.2.129"));
// 4. Consistency with wasm_bindgen_shared::version().
let pkg_version = version();
assert!(
pkg_version == SCHEMA_VERSION || pkg_version.starts_with(&format!("{SCHEMA_VERSION} (")),
"unexpected version() output: {pkg_version}"
);
println!("ok: SCHEMA_VERSION={SCHEMA_VERSION}, version={pkg_version}");
}
Seeder de origen
anónimo