grouse 0.3.1

A simple asset bundler for Rust.
Documentation
<div align="center">

# grouse

A simple asset bundler for Rust.

[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/callum-hopkins-dev/grouse/build.yaml?branch=main&event=push&style=for-the-badge)](https://github.com/callum-hopkins-dev/grouse/actions/workflows/build.yaml)
[![Crates.io Version](https://img.shields.io/crates/v/grouse?style=for-the-badge)](https://crates.io/crates/grouse)
[![docs.rs](https://img.shields.io/docsrs/grouse?style=for-the-badge)](https://docs.rs/grouse/latest/grouse)
[![Crates.io Total Downloads](https://img.shields.io/crates/d/grouse?style=for-the-badge)](https://crates.io/crates/grouse)
[![GitHub License](https://img.shields.io/github/license/callum-hopkins-dev/grouse?style=for-the-badge)](https://github.com/callum-hopkins-dev/grouse/blob/main/LICENSE)

</div>

## about

`grouse` is a very simple asset bundler intended for baking static
files directly into your Rust binaries. In short, `grouse` will generate a
unit `struct` that implements an `fn` to retreive all of the files within a
particular [Manifest], and one to lookup a file by it's sha256 digest.

## getting started

To start using `grouse`, you'll first need to add our package to your
`Cargo.toml` manifest:

```sh
cargo add grouse
```

Then you can bundle a directory into your Rust executable.

```rust
// Thanks to recently stablized proc-macro features, the include
// path is relative to the current file directory, like how the
// builtin [`core::include_bytes!`] macro works.
#[grouse::manifest("../src")]
struct Manifest;

fn main() {
  // Iterate through all of the files in the manifest.
  for file in Manifest::files() {
     eprintln!("{} => {}", file.path(), file.digest());
  }

  // We can also get the digest of a particular file directly.
  let x = grouse::file!("../src/lib.rs").digest();

  // Which can then be used to lookup it's corresponding file in the
  // manifest.
  let lib = Manifest::get(x).unwrap();
}
```