Sample
libc 0.2.190: libc::_SC_PAGESIZE
Verified sample for cargo libc 0.2.190: libc::_SC_PAGESIZE. The contract ran on rust 1 · linux alpine/x64 · docker and passed.
sha256:e77957f5bccb4394696f59bd0f50e81e743bc0d64e3818a06da294f14277f15b
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 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-15 |
Case
HOW- Goal
- verify libc::_SC_PAGESIZE in pkg:cargo/libc@0.2.190
- Packages
- Symbols
-
- libc::_SC_PAGESIZE
- Created
- 2026-10-15T20:01:56Z
Contract
- libc::_SC_PAGESIZE equals 30 on Linux and matches libc::_SC_PAGE_SIZE
- unsafe { libc::sysconf(libc::_SC_PAGESIZE) } returns a positive power-of-two page size in bytes (>= 4096)
Files
- Cargo.lock
- Cargo.toml
- PROMPT.md
- csx.json
- spec.json
- src/main.rs
- tests/contract.rs
Source
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "libc"
version = "0.2.190"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
[[package]]
name = "sample-sc-pagesize"
version = "0.1.0"
dependencies = [
"libc",
]
[package]
name = "sample-sc-pagesize"
version = "0.1.0"
edition = "2021"
[dependencies]
libc = "=0.2.190"
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 libc::_SC_PAGESIZE in pkg:cargo/libc@0.2.190
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:cargo/libc@0.2.190
Demonstrate these symbols/APIs:
- libc::_SC_PAGESIZE
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:a6f48500091682dd694dbfb1fb0f1fd5e464aaf22b49cc9ae451abb7742ff8f5","contract":["libc::_SC_PAGESIZE equals 30 on Linux and matches libc::_SC_PAGE_SIZE","unsafe { libc::sysconf(libc::_SC_PAGESIZE) } returns a positive power-of-two page size in bytes (\u003e= 4096)"],"goal":"verify libc::_SC_PAGESIZE in pkg:cargo/libc@0.2.190","kind":"HOW","packages":["pkg:cargo/libc@0.2.190"],"schemaVersion":1,"symbols":["libc::_SC_PAGESIZE"]},"contractCommand":["cargo","run","--offline"],"environment":{"arch":"x64","ecosystem":"cargo","os":"linux","packageManager":"cargo","schemaVersion":1},"license":"MIT-0","packages":["pkg:cargo/libc@0.2.190"],"schemaVersion":1,"subject":"pkg:cargo/libc@0.2.190","symbols":["libc::_SC_PAGESIZE"],"verifierAdapter":"cargo@1"}
{
"schemaVersion": 1,
"goal": "verify libc::_SC_PAGESIZE in pkg:cargo/libc@0.2.190",
"kind": "HOW",
"packages": [
"pkg:cargo/libc@0.2.190"
],
"symbols": [
"libc::_SC_PAGESIZE"
]
}
use libc::{_SC_PAGESIZE, _SC_PAGE_SIZE, c_int, c_long, sysconf};
pub fn query_pagesize() -> (c_int, c_long) {
let selector: c_int = libc::_SC_PAGESIZE;
let page_size: c_long = unsafe { sysconf(_SC_PAGESIZE) };
(selector, page_size)
}
fn main() {
let (selector, page_size) = query_pagesize();
assert_eq!(selector, 30);
assert_eq!(libc::_SC_PAGESIZE, _SC_PAGE_SIZE);
assert!(page_size >= 4096, "sysconf(_SC_PAGESIZE) must return a page size >= 4096 bytes");
assert_eq!(page_size & (page_size - 1), 0, "page size must be a power of two");
}
use libc::{_SC_PAGESIZE, _SC_PAGE_SIZE, c_int, c_long, sysconf};
#[test]
fn verify_sc_pagesize() {
let code: c_int = libc::_SC_PAGESIZE;
assert_eq!(code, 30);
assert_eq!(_SC_PAGESIZE, _SC_PAGE_SIZE);
let page_size: c_long = unsafe { sysconf(libc::_SC_PAGESIZE) };
assert!(page_size >= 4096);
assert_eq!(page_size & (page_size - 1), 0);
}
Origin Seeder
anonymous