containers / libocispec

a C library for accessing OCI runtime and image spec files
Other
52 stars 30 forks source link

Rust bindings: Update serializer to indent json before writing to file & update docs to use `main` branch for old cargo users. #101

Closed flouthoc closed 3 years ago

flouthoc commented 3 years ago

Update serializer to indent json before writing to file Reason: As of now libocispec rust binding's Spec::save is dumping all the json in a single line with no indentation at all. This PR fixes that.

Update docs : Encourage old cargo users to point libocispec dependency to main insead of master. Reason: Cargo version older then 0.51.0 would fail even for

libocispec = { git = "https://github.com/containers/libocispec" }

with error

Caused by:
  failed to load source for dependency `libocispec`

Caused by:
  Unable to update https://github.com/containers/libocispec

Caused by:
  failed to find branch `master`

Caused by:
  cannot locate remote-tracking branch 'origin/master'; class=Reference (4); code=NotFound (-3)