| Full name | SoftWare Hash IDentifier |
|---|---|
| Acronym | SWHID |
| Example | swh:1:dir:df32c75242bf8d797ccd43af8ce8e294f35cd8fd |
| Website | swhid.org |
TheSoftWare Hash IDentifier (SWHID) is apersistent identifier used to uniquely identify a particular piece of softwaresource code and its version. SWHID is a standard similar to theDOI, but is tailored specifically for software source code,[1] compatible with versioning software such asgit.
An SWHID can be used to point to different components or versions of the source code of a software package.[1] The SWHID is an intrinsic identifier in the sense that it describes the software based only on the software's intrinsic properties, with no reliance on an external register.[2]
The SWHID specification allows identifying different components of software source code. Object types relating to thesoftware version are labelled as "snapshot", "release" or "revision"; a "directory" of files and possibly subdirectories can be identified; and a specific piece of a specific version of source code can be labelled as "content".[1] These are related to one another in aMerkledirected acyclic graph.[3]
The identifier has the following syntax:[4]
swh:<scheme_version>:<object_type>:<object_id>[;qualifiers]
According to theFrench National Centre for Scientific Research (CNRS), software source code archived with SWHIDs includes the source codes ofApollo 11 navigation and of theNCSA Mosaic web browser.[5]
Version 3.0 of the Linux kernel, released in July 2011, has the following SWHID:[6]
swh:1:dir:df32c75242bf8d797ccd43af8ce8e294f35cd8fd
The following example, drawn from the specification documentation,[7] illustrates the use of multiple qualifiers in an SWHID:
swh:1:cnt:4d99d2d18326621ccdd70f5ea66c2e2ac236ad8b;origin=https://gitorious.org/ocamlp3l/ocamlp3l_cvs.git;visit=swh:1:snp:d7f1b9eb7ccb596c2622c4780febaa02549830f9;anchor=swh:1:rev:2db189928c94d62a3b4757b3eec68f0a4d4113f0;path=/Examples/SimpleFarm/simplefarm.ml;lines=9-15
SWHID is an open standard licensed under the Community Specification License.[8]
SWHID was formalized as the ISO 18670 standard in April 2025.[9]
The SoftWare Hash IDentifier was developed bySoftware Heritage. Software Heritage's archives, identified by their SWHIDs, were publicly released starting in 2018.[5]
As of 2020[update], SWHIDs were in use for about nine billion versions of pieces of software,[5] termed "artefacts".[4] SWHIDs are integrated with research repositories includingHAL,Zenodo and the French catalog of Academic Research Free Software.[10] The identifier can be used bypackage managers.Guix uses SWHIDs to retrieve source code in a software archive when unavailable at its original URL.[11]
The acronym SWHID originally referred to "Software Heritage Identifiers" used to catalog software artifacts in the early days of theSoftware Heritage archive.[12] It later evolved into an open standard through a dedicated working group[13] and was standardized as ISO in April 2025 under the more general name "Software Hash Identifier".[14]
Télécom Paris welcomed the ISO normalization arguing that it is a significant step in global digital infrastructure, providing traceability of software affected by vulnerabilities.[15] UNESCO stated that SWHID is useful for the reproducibility and long-term accessibility of software.[16]
Thiscomputer science article is astub. You can help Wikipedia byexpanding it. |