Implementations¶
This page provides information about SWHID implementations, the reference implementation, and the test suite for validating implementations.
Reference Implementation¶
The swhid-rs reference implementation is maintained by the SWHID Working Group.
- Repository: https://github.com/swhid/swhid-rs
- Language: Rust
- Description: Reference implementation of the SWHID standard
- License: MIT
Supported Types: cnt, dir, rev, rel, snp
Supported Qualifiers: origin, visit, anchor, path, lines, bytes
Test Suite¶
Test suite for validating SWHID implementations
- Repository: https://github.com/swhid/test-suite
The test suite can be used to validate that implementations correctly handle SWHID parsing, generation, and validation according to the specification.
Known Implementations¶
The following table lists known implementations of the SWHID standard, along with their supported types and qualifiers.
| Implementation | Language | Maintainer | License | Types | Qualifiers | Description |
|---|---|---|---|---|---|---|
| swh-model | Python | Software Heritage | GPL v3 | cnt dir rev rel snp |
origin visit anchor path lines — |
Command line tool and library |
| swhid for OCaml | OCaml | OCamlPro | ISC | cnt dir rev — — |
origin — — path — — |
OCaml library |
| swhid grammar tooling | JavaScript | Olivier Barais | --- | cnt dir rev rel snp |
origin visit anchor path lines bytes |
PEG.js grammar for SWHID parsing |
| swhid-ruby | Ruby | Andrew Newsbitt | MIT | cnt dir rev rel snp |
origin visit anchor path lines bytes |
Ruby implementation of the SWHID standard |
Type and Qualifier Legend¶
Types:
- cnt - Contents (files)
- dir - Directories
- rev - Revisions (commits)
- rel - Releases
- snp - Snapshots
Qualifiers:
- origin - Software origin (context qualifier)
- visit - Visit identifier (context qualifier)
- anchor - Anchor identifier (context qualifier)
- path - File path (context qualifier)
- lines - Line range (fragment qualifier)
- bytes - Byte range (fragment qualifier)
Adding a New Implementation¶
If you have created an implementation of the SWHID standard and would like it to be listed here, please open a pull request with the following information:
Template for Adding a New Implementation¶
- name: "Your Implementation Name"
repository: "https://github.com/your-org/your-repo"
language: "Programming Language"
maintainer: "Your Name or Organization"
description: "Brief description of your implementation"
license: "License name (e.g., MIT, GPL v3, Apache 2.0)"
license_url: "https://github.com/your-org/your-repo/blob/main/LICENSE" # Optional: URL to license file
types:
- cnt # Check all that apply
- dir
- rev
- rel
- snp
qualifiers:
- origin # Check all that apply
- visit
- anchor
- path
- lines
- bytes
Required Information¶
- Repository URL: Link to the implementation's source code repository
- Programming Language: The primary language used
- Maintainer: Name or organization maintaining the implementation
- Description: Brief description of what the implementation provides
- License: License under which the implementation is released (e.g., MIT, GPL v3, Apache 2.0). Use
---if no license is specified. - Supported Types: List of SWHID object types supported (
cnt,dir,rev,rel,snp) - Supported Qualifiers: List of qualifiers supported (
origin,visit,anchor,path,lines,bytes)
Optional Information¶
- License URL: URL to the license file in the repository (e.g.,
https://github.com/org/repo/blob/main/LICENSE). If provided, the license name will be displayed as a clickable link. - Documentation: Link to documentation or usage examples
- Test Suite Compatibility: Whether the implementation passes the SWHID test suite
To add your implementation, edit data/implementations.yaml and submit a pull request. The page will be automatically regenerated when your changes are merged.