{"id":15102835,"url":"https://github.com/tauri-apps/tauri-includedir","last_synced_at":"2025-09-27T00:31:44.452Z","repository":{"id":65978599,"uuid":"228285152","full_name":"tauri-apps/tauri-includedir","owner":"tauri-apps","description":null,"archived":true,"fork":false,"pushed_at":"2021-06-06T00:36:08.000Z","size":96,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"dev","last_synced_at":"2024-04-22T09:56:07.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tauri-apps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-16T02:17:40.000Z","updated_at":"2023-07-25T14:31:25.000Z","dependencies_parsed_at":"2023-02-19T19:16:05.139Z","dependency_job_id":null,"html_url":"https://github.com/tauri-apps/tauri-includedir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-includedir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-includedir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-includedir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-includedir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tauri-apps","download_url":"https://codeload.github.com/tauri-apps/tauri-includedir/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219871549,"owners_count":16554426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-25T19:08:03.712Z","updated_at":"2025-09-27T00:31:39.178Z","avatar_url":"https://github.com/tauri-apps.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"tauri_includedir\n===========\n\n## Deprecation notice\n\nThis crate was deprecated. It is now part of the `tauri-codegen` crate.\n\n# tauri-includedir\n\nInclude a directory in your Rust binary, e.g. static files for your web server or assets for your game.\n\n## Features\n\n* [x] Automatically compile data into binary\n* [x] Use [rust-phf](https://github.com/sfackler/rust-phf) for efficient lookup\n* [x] Wrapping API around the phf map, to abstract away additional features\n* [x] Compression, with optional crate \"flate2\"\n* [x] Reading from source files for debug builds\n\n## Example\n\n**Cargo.toml**\n```toml\n[package]\nname = \"example\"\nversion = \"0.1.0\"\n\nbuild = \"build.rs\"\ninclude = [\"data\"]\n\n[dependencies]\nphf = \"0.8.0\"\ntauri_includedir = \"0.5.0\"\n\n[build-dependencies]\ntauri_includedir_codegen = \"0.5.0\"\n```\n\n**build.rs**\n\n```rust\nextern crate tauri_includedir_codegen;\n\nuse tauri_includedir_codegen::Compression;\n\nfn main() {\n    tauri_includedir_codegen::start(\"FILES\")\n        .dir(\"data\", Compression::Gzip)\n        .build(\"data.rs\")\n        .unwrap();\n}\n```\n\n**src/main.rs**\n\n```rust\nextern crate tauri_includedir;\nextern crate phf;\n\nuse std::env;\n\ninclude!(concat!(env!(\"OUT_DIR\"), \"/data.rs\"));\n\nfn main() {\n    FILES.set_passthrough(env::var_os(\"PASSTHROUGH\").is_some());\n\n    println!(\"{:?}\", FILES.get(\"data/foo\"))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauri-apps%2Ftauri-includedir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftauri-apps%2Ftauri-includedir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauri-apps%2Ftauri-includedir/lists"}