An open API service indexing awesome lists of open source software.

https://github.com/flouthoc/oci_lib

oci-image and oci-runtime spec in rust. Un-official mirror of libocispec.
https://github.com/flouthoc/oci_lib

container docker kubernetes oci-image oci-runtime open-containers opencontainers

Last synced: 8 months ago
JSON representation

oci-image and oci-runtime spec in rust. Un-official mirror of libocispec.

Awesome Lists containing this project

README

          

# oci_lib
Oci-Spec for your container runtime or container registry.
- - -
Most of the code is mirrored from upstream [libocispec](https://github.com/containers/libocispec)

Oci-lib is a rust port for original oci spec written in go. Following crate contains rust equivalent spec for OCI Image Format Specification ( https://github.com/opencontainers/image-spec ) and OCI Runtime format specification (https://github.com/opencontainers/runtime-spec).

## Motivation
Initially written as a dependency for vas-quod ( https://github.com/flouthoc/vas-quod ).

## Usage
```rust
extern crate oci_lib;
use oci_lib::runtime;
use oci_lib::image;

fn main() {
let runtime_spec = match runtime::Spec::load("path") {
Ok(spec) => spec,
Err(e) => panic!("{}", e),
}
let image_spec = match image::ImageConfig::load("path") {
Ok(spec) => spec,
Err(e) => panic!("{}", e),
}
}
```
### References
* https://opencontainers.org/
* https://github.com/opencontainers/image-spec/blob/master/specs-go/v1/config.go
* https://github.com/opencontainers/runtime-spec/blob/master/specs-go/config.go
* https://github.com/oracle/railcar/tree/master/oci