Crates.io | kinda-virtual-fs |
lib.rs | kinda-virtual-fs |
version | 0.1.1 |
source | src |
created_at | 2022-07-26 12:41:24.483307 |
updated_at | 2022-07-26 12:44:14.444253 |
description | A Rust library to imitate virtual filesystem and use statically linked files |
homepage | |
repository | https://github.com/krypt0nn/kinda-virtual-fs |
max_upload_size | |
id | 633150 |
size | 43,267 |
A Rust library to imitate virtual filesystem. Used by me to link files in my applications
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