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.
- Host: GitHub
- URL: https://github.com/flouthoc/oci_lib
- Owner: flouthoc
- License: mit
- Created: 2021-03-14T13:47:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-15T12:12:28.000Z (over 4 years ago)
- Last Synced: 2025-04-11T14:13:34.626Z (about 1 year ago)
- Topics: container, docker, kubernetes, oci-image, oci-runtime, open-containers, opencontainers
- Language: Rust
- Homepage:
- Size: 22.5 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
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