Skip to content

Latest commit

 

History

History
92 lines (87 loc) · 2.12 KB

API.md

File metadata and controls

92 lines (87 loc) · 2.12 KB

Info

  • Index holds the latest version built. (https://github.com/cargo-prebuilt/index/releases/download/stable-index/CRATE)
  • Builds are put under a prerelease named/tagged CRATE-VERSION.
  • Info about release held in info.json.
    • Targets and archive extension in info.json.
    • Hash info held in hash file. (Default: hashes.json)
    • Report files listed in info.json.
    • If info.json and hashes.json are signed, then signature files are listed.
  • The binary is in TARGET.tar.gz file and the hash for the compressed tar file is in hashes.json.
  • There are also three different report files generated.
    • deps.report is a list of deps used generated by cargo tree.
    • audit.report is an audit report generated using cargo-audit.
    • license.report is a file holding information about the license(s) and the license(s) themselves.

info.json

{
  "info_version": "1",
  "id": "CRATES.IO ID",
  "version": "VERSION",
  "license": "SPDX LICENSE",
  "git": "GIT URL",
  "description": "CRATES.IO DESCRIPTION",
  "bins": [
    "BINARY",
    "BINARY?"
  ],
  "info": {
    "META": "DATA"
  },
  "archive": {
    "compression": "gz",
    "ext": "tar.gz"
  },
  "files": {
    "hash": "hashes.json",
    "license": "license.report",
    "deps": "deps.report",
    "audit": "audit.report",
    "sig_info": "OPTIONAL:info.json.minisig",
    "sig_hashes": "OPTIONAL:hashes.json.minisig"
  },
  "targets": [
    "TARGET",
    "TARGET?"
  ]
}

hashes.json

{
  "hashes_version": "1",
  "hashes": {
    "TARGET": {
      "archive": {
        "HASH_TYPE": "HASH",
        "HASH_TYPE?": "HASH?"
      },
      "bins": {
        "BINARY": {
          "HASH_TYPE": "HASH",
          "HASH_TYPE?": "HASH?"
        },
        "BINARY?": {
          "HASH_TYPE": "HASH",
          "HASH_TYPE?": "HASH?"
        }
      }
    },
    "TARGET?": {
      "archive": {
        "HASH_TYPE": "HASH",
        "HASH_TYPE?": "HASH?"
      },
      "bins": {
        "BINARY": {
          "HASH_TYPE": "HASH",
          "HASH_TYPE?": "HASH?"
        },
        "BINARY?": {
          "HASH_TYPE": "HASH",
          "HASH_TYPE?": "HASH?"
        }
      }
    }
  }
}