Skip to main content

embed_directory

Macro embed_directory 

Source
macro_rules! embed_directory {
    ($name:tt, $path:tt) => { ... };
}
Expand description

Returns an embedded Vc<Box<dyn FileSystem>> for the given path.

This will embed a directory’s content into the binary and create an Vc<EmbeddedFileSystem>.

If you enable the dynamic_embed_contents feature, calling the macro will return a Vc<DiskFileSystem>.

This enables dynamic linking (and hot reloading) of embedded files/dirs. A binary built with dynamic_embed_contents enabled is is not portable, only the directory path will be embedded into the binary.