Registry / utility / includedir

includedir

JSON →
library0.6.0rscratesunverified

Include a whole directory tree at compile time, providing runtime access to embedded files.

# Cargo.toml [dependencies] includedir = "0.6.0"
INSTALL
IMPORT
SIG · INCLUDEDIR
I
includedir
utilityrustv0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

include_dir
use includedir::include_dir;

Embed a directory at compile time and access its files.

use includedir::include_dir; static FILES: include_dir::Dir = include_dir!("$CARGO_MANIFEST_DIR/assets"); fn main() { if let Some(file) = FILES.get_file("hello.txt") { println!("Content: {}", file.contents_utf8().unwrap()); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.6.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
includedir — cargo add includedir · libregistry