Skip to content

Commit

Permalink
libs/sys-util: add kata-sys-util crate under src/libs
Browse files Browse the repository at this point in the history
The kata-sys-util crate is a collection of modules that provides helpers
and utilities used by multiple Kata Containers components.

Fixes: kata-containers#3305

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
  • Loading branch information
jiangliu committed Jan 14, 2022
1 parent 47feca1 commit 155c9ce
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/libs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
members = [
"logging",
"kata-types",
"kata-sys-util",
]
resolver = "2"
1 change: 1 addition & 0 deletions src/libs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Currently it provides following library crates:
| Library | Description |
|-|-|-|
| [logging](logging/) | Facilities to setup logging subsystem based slog. |
| [system utilities](kata-sys-util/) | A collection of facilities and helpers to access system services. |
| [types](kata-types/) | A collection of constants and data types shared by multiple Kata components. |
13 changes: 13 additions & 0 deletions src/libs/kata-sys-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "kata-sys-util"
version = "0.1.0"
description = "System Utilities for Kata Containers"
keywords = ["kata", "container", "runtime"]
authors = ["The Kata Containers community <kata-dev@lists.katacontainers.io>"]
repository = "https://github.com/kata-containers/kata-containers.git"
homepage = "https://katacontainers.io/"
readme = "README.md"
license = "Apache-2.0"
edition = "2018"

[dependencies]
19 changes: 19 additions & 0 deletions src/libs/kata-sys-util/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# kata-sys-util

This crate is a collection of utilities and helpers for
[Kata Containers](https://github.com/kata-containers/kata-containers/) components to access system services.

It provides safe wrappers over system services, such as:
- cgroups
- file systems
- mount
- NUMA

## Support

**Operating Systems**:
- Linux

## License

This code is licensed under [Apache-2.0](../../../LICENSE).
4 changes: 4 additions & 0 deletions src/libs/kata-sys-util/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright (c) 2021 Alibaba Cloud
//
// SPDX-License-Identifier: Apache-2.0
//

0 comments on commit 155c9ce

Please sign in to comment.