scrollcase-consumer 0.1.1

Verify, prepare, and run caller-supplied local Scrollcase boxes.
Documentation
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://scrollcase.dev/schema/v2/target.schema.json",
  "title": "Box target",
  "description": "The platform, architecture and accelerator a box is built for. The supported combinations are closed: a target outside this matrix has no defined identifier and cannot be built, signed, or routed.",
  "type": "object",
  "additionalProperties": false,
  "required": ["platform", "arch", "accelerator"],
  "properties": {
    "platform": {
      "enum": ["macos", "linux", "windows"],
      "description": "Operating system the box runs on.",
      "examples": ["linux"]
    },
    "arch": {
      "enum": ["aarch64", "x86_64"],
      "description": "CPU architecture the box runs on; supported combinations are constrained below.",
      "examples": ["x86_64"]
    },
    "accelerator": {
      "enum": ["cpu", "metal", "cuda"],
      "description": "Acceleration backend built into the environment.",
      "default": "cpu",
      "examples": ["cpu"]
    },
    "cudaVersion": {
      "type": "string",
      "pattern": "^[1-9][0-9]*\\.[0-9]+$",
      "description": "CUDA ABI as major.minor, for example \"12.8\". Required for a CUDA target and forbidden for any other, so an identifier can never be ambiguous."
    }
  },
  "allOf": [
    {
      "if": { "properties": { "accelerator": { "const": "cuda" } }, "required": ["accelerator"] },
      "then": { "required": ["cudaVersion"] },
      "else": { "not": { "required": ["cudaVersion"] } }
    },
    {
      "if": { "properties": { "platform": { "const": "macos" } }, "required": ["platform"] },
      "then": {
        "properties": {
          "arch": { "const": "aarch64" },
          "accelerator": { "enum": ["metal", "cpu"] }
        }
      }
    },
    {
      "if": { "properties": { "platform": { "enum": ["linux", "windows"] } }, "required": ["platform"] },
      "then": {
        "properties": {
          "arch": { "const": "x86_64" },
          "accelerator": { "enum": ["cpu", "cuda"] }
        }
      }
    }
  ]
}