{"id":57406,"library":"rust-embed","title":"rust-embed","description":"Rust Custom Derive Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev","status":"active","version":"8.11.0","language":"rust","source_language":null,"source_url":"https://pyrossh.dev/repos/rust-embed","tags":["embed","assets","compile-time","macro"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nrust-embed = \"8.11.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add rust-embed","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"RustEmbed","correct":"use rust_embed::RustEmbed;"}],"quickstart":{"code":"use rust_embed::RustEmbed;\n#[derive(RustEmbed)]\n#[folder = \"examples/\"]\nstruct Asset;\nfn main() {\n    let file = Asset::get(\"hello.txt\").unwrap();\n    println!(\"{:?}\", std::str::from_utf8(&file.data));\n}","lang":"rust","description":"Embed files from a folder into the binary at compile time."},"warnings":[{"fix":"Use `--release` to embed files into the binary.","message":"Files are loaded from the filesystem in debug mode, not embedded.","severity":"gotcha","affected_versions":">=8.0.0"}],"env_vars":null,"search_vec":"'asset':30 'binari':14 'compil':16,32 'compile-tim':31 'custom':5 'deriv':6 'dev':28 'emb':3,29 'file':10,23 'fs':26 'load':9,21 'macro':7,34 'releas':19 'rust':2,4,13 'rust-emb':1 'time':17,33","created_at":"2026-06-16T15:41:08.962033+00:00","updated_at":"2026-06-16T15:41:08.962033+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://pyrossh.dev/repos/rust-embed","github":null,"docs":"https://docs.rs/rust-embed/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}