Sample
redox_syscall 0.5.18
Verified sample for cargo redox_syscall 0.5.18. The contract ran on rust 1 · linux alpine/x64 · docker and passed: syscall::Error::new(syscall::ENOENT)…
sha256:b2ee97ac19fd271b34f92484d6c241f7c6a9ffb1f4deab5bc5916d7cc13827ec
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-11-01 |
Case
HOW- Goal
- verify pkg:cargo/redox_syscall@0.5.18
- Packages
- Created
- 2026-11-01T17:16:23Z
Contract
- syscall::Error::new(syscall::ENOENT) constructs an Error with errno ENOENT and a non-empty descriptive text
- syscall::Error::mux and syscall::Error::demux round-trip both Err(Error) and Ok(usize) results accurately
- syscall::TimeSpec and syscall::Stat initialize and expose POSIX-like fields alongside flag constants MODE_FILE, MODE_PERM, O_RDONLY, and O_WRONLY
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 = "bitflags"
version = "2.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
[[package]]
name = "redox_syscall"
version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
"bitflags",
]
[[package]]
name = "sample-redox-syscall"
version = "0.1.0"
dependencies = [
"redox_syscall",
]
[package]
name = "sample-redox-syscall"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
redox_syscall = "=0.5.18"
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/redox_syscall@0.5.18
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:cargo/redox_syscall@0.5.18
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:a4d2c1d73fcb40d3b7f05b46a548a4449a2329cc07b66d64b8e68237f1d9ba32","contract":["syscall::Error::new(syscall::ENOENT) constructs an Error with errno ENOENT and a non-empty descriptive text","syscall::Error::mux and syscall::Error::demux round-trip both Err(Error) and Ok(usize) results accurately","syscall::TimeSpec and syscall::Stat initialize and expose POSIX-like fields alongside flag constants MODE_FILE, MODE_PERM, O_RDONLY, and O_WRONLY"],"goal":"verify pkg:cargo/redox_syscall@0.5.18","kind":"HOW","packages":["pkg:cargo/redox_syscall@0.5.18"],"schemaVersion":1},"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/redox_syscall@0.5.18"],"schemaVersion":1,"subject":"pkg:cargo/redox_syscall@0.5.18","verifierAdapter":"cargo@1"}
{
"schemaVersion": 1,
"goal": "verify pkg:cargo/redox_syscall@0.5.18",
"kind": "HOW",
"packages": [
"pkg:cargo/redox_syscall@0.5.18"
]
}
use syscall::{Error, Result, Stat, TimeSpec, ENOENT, MODE_FILE, MODE_PERM, O_RDONLY, O_WRONLY};
fn verify_error_and_result() -> Result<usize> {
let err = Error::new(ENOENT);
assert_eq!(err.errno, ENOENT);
assert!(!err.text().is_empty());
let mux = Error::mux(Err(err));
let demuxed = Error::demux(mux);
assert_eq!(demuxed, Err(Error::new(ENOENT)));
let ok_mux = Error::mux(Ok(42));
assert_eq!(Error::demux(ok_mux), Ok(42));
Error::demux(ok_mux)
}
fn main() {
let val = verify_error_and_result().expect("demux ok value");
assert_eq!(val, 42);
let ts = TimeSpec {
tv_sec: 123,
tv_nsec: 456,
};
assert_eq!(ts.tv_sec, 123);
assert_eq!(ts.tv_nsec, 456);
let stat = Stat {
st_mode: MODE_FILE | (0o644 & MODE_PERM),
st_size: 1024,
..Stat::default()
};
assert_eq!(stat.st_size, 1024);
assert_eq!(stat.st_mode & MODE_PERM, 0o644);
assert_ne!(O_RDONLY, O_WRONLY);
}
Origin Seeder
anonymous