Skip to content

Commit

Permalink
chore: fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
SKalt committed Jan 18, 2024
1 parent 179515d commit b110662
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Put extra debugging variables behind [`#[cfg(debug_assertions)]` conditional-com

To keep the library size small and keep ownership of all of the relevant logic.

I chose not to use the excellent [`regex` crate](https::github.com/rust-lang/regex) since:
I chose not to use the excellent [`regex` crate](https://github.com/rust-lang/regex) since:

1. writing the parsers as pure functions avoids issues of [cross-thread resource contention](https://docs.rs/regex/latest/regex/#sharing-a-regex-across-threads-can-result-in-contention).
1. I _think_ `regex` relies on pointer-sized offsets for capture groups, which cancels out the short-length optimizations. A scan through the `regex` and `regex-automata` docs and issues didn't reveal a way to use `u8`s .
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
A docker/OCI image reference parser.

[![Crates.io](https://img.shields.io/crates/v/container_image_dist_ref.svg)](https://crates.io/crates/container_image_dist_ref)
[![docs.rs](https://img.shields.io/docsrs/container_image_dist_ref)](https://docs.rs/container_image_dist_ref/latest/container_image_dist_ref/)

This library is extensively tested against the authoritative image reference implementation, https://github.com/distribution/reference.
`distribution/reference` uses the following [EBNF](https://www.w3.org/TR/xml11/#sec-notation) grammar:

<!-- {{{sh cat ./grammars/reference.ebnf }}}{{{out skip=2 -->

Expand Down Expand Up @@ -33,6 +35,8 @@ identifier ::= [a-f0-9]{64}

<!-- }}} skip=2 -->

(This is translated from [https://github.com/distribution/reference/blob/main/reference.go](https://github.com/distribution/reference/blob/main/reference.go#L4-L26))

## Motivation

<!-- TODO: rewrite -->
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
These fixtures are copied from the https://github.com/distribution/reference repo.
As such, the test cases are governed by the Apache-2 license at https://github.com/distribution/reference/blob/main/LICENSE.

[./inputs.txt](./inputs.txt) is drawn from https://github.com/distribution/reference/blob/main/reference_test.go
[./references/valid/inputs.txt](./references/valid/inputs.txt) and [./references/valid/inputs.txt](./references/invalid/inputs.txt) are drawn from https://github.com/distribution/reference/blob/main/reference_test.go

0 comments on commit b110662

Please sign in to comment.