mkswap

Crates.iomkswap
lib.rsmkswap
version0.1.1
sourcesrc
created_at2022-07-03 18:47:24.985715
updated_at2022-10-12 16:39:53.712237
descriptionCreate a swap file or device in pure Rust.
homepagehttps://github.com/grahamc/mkswap
repositoryhttps://github.com/grahamc/mkswap
max_upload_size
id618503
size12,082
Graham Christensen (grahamc)

documentation

README

mkswap in pure Rust

Initialize a swap device or file in Rust.

For example:

```rust
use std::io::Cursor;

use mkswap::SwapWriter;

let mut buffer: Cursor<Vec<u8>> = Cursor::new(vec![0; 40 * 1024]);
let size = SwapWriter::new()
    .label("🔀".into())
    .unwrap()
    .write(&mut buffer)
    .unwrap();

Commit count: 8

cargo fmt