kinda-virtual-fs

Crates.iokinda-virtual-fs
lib.rskinda-virtual-fs
version0.1.1
sourcesrc
created_at2022-07-26 12:41:24.483307
updated_at2022-07-26 12:44:14.444253
description A Rust library to imitate virtual filesystem and use statically linked files
homepage
repositoryhttps://github.com/krypt0nn/kinda-virtual-fs
max_upload_size
id633150
size43,267
Nikita Podvirnyi (krypt0nn)

documentation

README

🦀 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

Commit count: 6

cargo fmt