docs: improve README formatting and badges

- Add crates.io badge
- Simplify header and description
- Fix markdown heading levels (# -> ##)
- Fix code block language annotation spacing
- Remove redundant blank lines

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius
2026-01-30 12:39:47 +08:00
parent b99114bf40
commit 3eeab4ef1c

View File

@@ -1,15 +1,14 @@
# cgroups-rs ![Build](https://travis-ci.org/kata-containers/cgroups-rs.svg?branch=master)
Native Rust library for managing control groups under Linux
# cgroups-rs
Both v1 and v2 of cgroups are supported.
[![Crate](https://img.shields.io/crates/v/cgroups-rs.svg)](https://crates.io/crates/cgroups-rs)
# Examples
Native Rust library for managing Linux control groups. Supports both cgroups v1 and v2.
## Create a control group using the builder pattern
``` rust
## Examples
### Create a control group using the builder pattern
```rust
use cgroups_rs::*;
use cgroups_rs::cgroup_builder::*;
@@ -44,7 +43,7 @@ cg.delete();
// major version change.
```
# Disclaimer
## Disclaimer
This crate is licensed under: