#virtual-filesystem #linked #statically #kinda #imitate

kinda-virtual-fs

A Rust library to imitate virtual filesystem and use statically linked files

1 unstable release

0.1.1 Jul 26, 2022
0.1.0 Jul 26, 2022

#1549 in Filesystem

Download history 133/week @ 2024-07-28 73/week @ 2024-08-04 78/week @ 2024-08-11 40/week @ 2024-08-18 70/week @ 2024-08-25 176/week @ 2024-09-01 98/week @ 2024-09-08 79/week @ 2024-09-15 113/week @ 2024-09-22 92/week @ 2024-09-29 144/week @ 2024-10-06 143/week @ 2024-10-13 100/week @ 2024-10-20 132/week @ 2024-10-27 128/week @ 2024-11-03 78/week @ 2024-11-10

450 downloads per month

GPL-3.0 license

15KB
86 lines

🦀 kinda-virtual-fs

A Rust library to imitate virtual filesystem. Used by me to link files in my applications

Example

use std::collections::HashMap;

use kinda_virtual_fs::*;

// File `../assets/icon.png` will be statically linked by the rust compiler
let storage = Storage::new(HashMap::from([
    ("icon", include_bytes!("../assets/icon.png"))
]));

let path = storage.map("icon").unwrap();

println!("Icon was saved as {}", path);

Author: Nikita Podvirnyy

Licensed under GNU GPL 3.0

No runtime deps