reinda: easily embed and manage assets

CI status of master Crates.io Version docs.rs

This library helps you manage your assets (external files) and is mostly intended to be used in web applications. Assets can be embedded into the binary file to obtain an easy to deploy standalone executable. This crate also offers a template engine and the ability to automatically include a hash of an asset's content into its filename (useful for caching on the web). In release mode, this crate prepares everything up-front such that the actually serving the file via HTTP can be as fast as possible.

You might know the crate rust-embed: reinda does basically the same, but for the most part has more features and is more flexible (in my opinion).

Tiny example:

```rust use reinda::{assets, Assets, Config, Setup};

const ASSETS: Setup = assets! { #![base_path = "assets"]

"index.html": { template },
"bundle.js": { hash },

};

let assets = Assets::new(ASSETS, Config::default()).await?;

// Retrieve specific asset. You can now send this data via HTTP or use it however you like. let bytes /* : Option */ = assets.get("index.html")?; ```

See the documentation for more information.

Features

Status of this project

This project is very young. I developed it specifically for a web application I work on where rust-embed did not offer enough features. You should absolutely not use this in production yet, but you sure can try it out.

If you have any thoughts about this project, please let me know in this community feedback issue!



License

Licensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.