CodeSampleX

サンプル

@rollup/rollup-linux-arm-gnueabihf 4.62.5

検証済みサンプル — npm @rollup/rollup-linux-arm-gnueabihf 4.62.5. node 22 · linux alpine/x64 · docker で contract を実行し、成功しました: assert package resolution resolves…

sha256:2bee7de8e0ef29f1e135be5a04179ed8cf00be5b8ecbe3d59097e2dbb04e1787

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
1
ビルドした署名鍵
1
宣言された環境 linux 24 · ubuntu · glibc 2.39 x64 npm

検証実行環境

環境 コントラクト ステージ 実行日
node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-21

ケース

HOW
ゴール
verify pkg:npm/%40rollup/rollup-linux-arm-gnueabihf@4.62.5
パッケージ
作成日
2026-08-21T12:55:25Z

コントラクト

  1. assert package resolution resolves @rollup/rollup-linux-arm-gnueabihf to rollup.linux-arm-gnueabihf.node
  2. assert package manifest specifies os linux, cpu arm, and libc glibc
  3. assert binary header contains 32-bit little-endian ELF magic, EM_ARM architecture code 40, and EABI v5 hard-float flags
  4. assert requiring Linux arm-gnueabihf native binary on mismatched host throws ERR_DLOPEN_FAILED

ファイル

  • .npmrc
  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • test/contract.cjs

ソースアーティファクトをダウンロード (tar.gz)

ソース

.npmrc
force = true
PROMPT.md
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:npm/%40rollup/rollup-linux-arm-gnueabihf@4.62.5
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/%40rollup/rollup-linux-arm-gnueabihf@4.62.5

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.
csx.json
{"case":{"caseId":"case:sha256:f70dbde0964a0d050c0c66b1b28528bc58629c8a43457a99063ec2040ac9b6f6","contract":["assert package resolution resolves @rollup/rollup-linux-arm-gnueabihf to rollup.linux-arm-gnueabihf.node","assert package manifest specifies os linux, cpu arm, and libc glibc","assert binary header contains 32-bit little-endian ELF magic, EM_ARM architecture code 40, and EABI v5 hard-float flags","assert requiring Linux arm-gnueabihf native binary on mismatched host throws ERR_DLOPEN_FAILED"],"goal":"verify pkg:npm/%40rollup/rollup-linux-arm-gnueabihf@4.62.5","kind":"HOW","packages":["pkg:npm/%40rollup/rollup-linux-arm-gnueabihf@4.62.5"],"schemaVersion":1},"contractCommand":["node","test/contract.cjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/%40rollup/rollup-linux-arm-gnueabihf@4.62.5"],"schemaVersion":1,"subject":"pkg:npm/%40rollup/rollup-linux-arm-gnueabihf@4.62.5","verifierAdapter":"node-typescript@1"}
package-lock.json
{
  "name": "sample-rollup-linux-arm-gnueabihf",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "sample-rollup-linux-arm-gnueabihf",
      "version": "1.0.0",
      "license": "MIT-0",
      "dependencies": {
        "@rollup/rollup-linux-arm-gnueabihf": "4.62.5"
      }
    },
    "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
      "version": "4.62.5",
      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.5.tgz",
      "integrity": "sha512-r9fGh3eFs3e/udWh5ZjXQtxiYK/xoFxQaYR/cELxac/Udkl5Th+IsFm0CX3Kl9hmUH/we7EoMpjJgeQNnE0+IA==",
      "cpu": [
        "arm"
      ],
      "license": "MIT",
      "os": [
        "linux"
      ]
    }
  }
}
package.json
{
  "name": "sample-rollup-linux-arm-gnueabihf",
  "version": "1.0.0",
  "private": true,
  "license": "MIT-0",
  "dependencies": {
    "@rollup/rollup-linux-arm-gnueabihf": "4.62.5"
  }
}
spec.json
{
  "schemaVersion": 1,
  "goal": "verify pkg:npm/%40rollup/rollup-linux-arm-gnueabihf@4.62.5",
  "kind": "HOW",
  "packages": [
    "pkg:npm/%40rollup/rollup-linux-arm-gnueabihf@4.62.5"
  ]
}
test/contract.cjs
const assert = require("node:assert");
const fs = require("node:fs");
const path = require("node:path");

// 1. Assert package resolution resolves @rollup/rollup-linux-arm-gnueabihf to rollup.linux-arm-gnueabihf.node
const resolved = require.resolve("@rollup/rollup-linux-arm-gnueabihf");
assert(
  resolved.endsWith("rollup.linux-arm-gnueabihf.node"),
  "package main resolves to rollup.linux-arm-gnueabihf.node"
);

// 2. Assert package manifest specifies os linux, cpu arm, and libc glibc
const pkgDir = path.dirname(resolved);
const pkgJson = JSON.parse(
  fs.readFileSync(path.join(pkgDir, "package.json"), "utf8")
);
assert.strictEqual(pkgJson.name, "@rollup/rollup-linux-arm-gnueabihf");
assert.strictEqual(pkgJson.version, "4.62.5");
assert.deepStrictEqual(pkgJson.os, ["linux"]);
assert.deepStrictEqual(pkgJson.cpu, ["arm"]);
assert.deepStrictEqual(pkgJson.libc, ["glibc"]);
assert.strictEqual(pkgJson.main, "./rollup.linux-arm-gnueabihf.node");

// 3. Assert binary header contains 32-bit little-endian ELF magic, EM_ARM architecture code 40, and EABI v5 hard-float flags
const fd = fs.openSync(resolved, "r");
const header = Buffer.alloc(40);
fs.readSync(fd, header, 0, 40, 0);
fs.closeSync(fd);

// ELF Magic: 0x7f, "E", "L", "F"
assert.strictEqual(header[0], 0x7f, "ELF magic byte 0");
assert.strictEqual(header[1], 0x45, "ELF magic byte 1 ('E')");
assert.strictEqual(header[2], 0x4c, "ELF magic byte 2 ('L')");
assert.strictEqual(header[3], 0x46, "ELF magic byte 3 ('F')");

// ELF Class: 1 = 32-bit
assert.strictEqual(header[4], 1, "ELF class is 32-bit (ELFCLASS32)");

// ELF Data: 1 = Little-endian
assert.strictEqual(header[5], 1, "ELF data encoding is 2's complement, little endian");

// ELF Machine: 40 = EM_ARM
const eMachine = header.readUInt16LE(18);
assert.strictEqual(eMachine, 40, "ELF machine is EM_ARM (40)");

// ELF Flags: 0x05000400 = EF_ARM_EABI_VER5 | EF_ARM_ABI_FLOAT_HARD
const eFlags = header.readUInt32LE(36);
assert.strictEqual(eFlags, 0x05000400, "ELF flags specify ARM EABI v5 and hard-float ABI (gnueabihf)");

// 4. Assert requiring Linux arm-gnueabihf native binary on mismatched host throws ERR_DLOPEN_FAILED
if (process.platform !== "linux" || process.arch !== "arm") {
  assert.throws(
    () => {
      require("@rollup/rollup-linux-arm-gnueabihf");
    },
    (err) => {
      return err.code === "ERR_DLOPEN_FAILED";
    },
    "dynamic loading throws ERR_DLOPEN_FAILED on mismatched host platform"
  );
}

オリジンシーダー

匿名