mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
libs/sys-util: add kata-sys-util crate under src/libs
The kata-sys-util crate is a collection of modules that provides helpers and utilities used by multiple Kata Containers components. Fixes: #3305 Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
This commit is contained in:
parent
48c201a1ac
commit
45a00b4f02
24
src/libs/Cargo.lock
generated
24
src/libs/Cargo.lock
generated
@ -89,7 +89,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
"num-integer",
|
"num-integer",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"time",
|
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -307,6 +306,10 @@ version = "1.0.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
|
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "kata-sys-util"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kata-types"
|
name = "kata-types"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@ -382,7 +385,7 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"miow",
|
"miow",
|
||||||
"ntapi",
|
"ntapi",
|
||||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
"wasi",
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -810,17 +813,6 @@ dependencies = [
|
|||||||
"once_cell",
|
"once_cell",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "time"
|
|
||||||
version = "0.1.44"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"wasi 0.10.0+wasi-snapshot-preview1",
|
|
||||||
"winapi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.17.0"
|
version = "1.17.0"
|
||||||
@ -938,12 +930,6 @@ dependencies = [
|
|||||||
"nix 0.23.1",
|
"nix 0.23.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "wasi"
|
|
||||||
version = "0.10.0+wasi-snapshot-preview1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasi"
|
name = "wasi"
|
||||||
version = "0.11.0+wasi-snapshot-preview1"
|
version = "0.11.0+wasi-snapshot-preview1"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
members = [
|
members = [
|
||||||
"logging",
|
"logging",
|
||||||
"kata-types",
|
"kata-types",
|
||||||
|
"kata-sys-util",
|
||||||
"safe-path",
|
"safe-path",
|
||||||
"protocols",
|
"protocols",
|
||||||
"oci",
|
"oci",
|
||||||
|
@ -7,5 +7,6 @@ Currently it provides following library crates:
|
|||||||
| Library | Description |
|
| Library | Description |
|
||||||
|-|-|
|
|-|-|
|
||||||
| [logging](logging/) | Facilities to setup logging subsystem based on slog. |
|
| [logging](logging/) | Facilities to setup logging subsystem based on slog. |
|
||||||
|
| [system utilities](kata-sys-util/) | Collection of facilities and helpers to access system services. |
|
||||||
| [types](kata-types/) | Collection of constants and data types shared by multiple Kata Containers components. |
|
| [types](kata-types/) | Collection of constants and data types shared by multiple Kata Containers components. |
|
||||||
| [safe-path](safe-path/) | Utilities to safely resolve filesystem paths. |
|
| [safe-path](safe-path/) | Utilities to safely resolve filesystem paths. |
|
||||||
|
13
src/libs/kata-sys-util/Cargo.toml
Normal file
13
src/libs/kata-sys-util/Cargo.toml
Normal file
@ -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
src/libs/kata-sys-util/README.md
Normal file
19
src/libs/kata-sys-util/README.md
Normal file
@ -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
src/libs/kata-sys-util/src/lib.rs
Normal file
4
src/libs/kata-sys-util/src/lib.rs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// Copyright (c) 2021 Alibaba Cloud
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
Loading…
Reference in New Issue
Block a user