MCPcopy Index your code
hub / github.com/LukasKalbertodt/reinda

github.com/LukasKalbertodt/reinda @v0.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.0 ↗ · + Follow
119 symbols 207 edges 18 files 32 documented · 27%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

reinda: easily embed and manage assets

CI status of main Crates.io Version docs.rs

This library helps your web applications manage your assets (external files). Assets can be compressed and embedded into the binary file to obtain an easy to deploy standalone executable. In debug mode, assets are loaded dynamically to avoid having to recompile the backend. A hash can be automatically included in an asset's filename to enable good 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:

use reinda::{Assets, Embeds, embed};

// Embed some assets
const EMBEDS: Embeds = embed! {
    base_path: "../assets",
    files: ["index.html", "bundle.*.js"],
};

// Configure assets
let mut builder = Assets::build();
builder.add_embedded("index.html", &EMBEDS["index.html"]);
builder.add_embedded("static/", &EMBEDS["bundle.*.js"]);
let assets = builder.build().await?;

// Retrieve asset for serving. The `.await?` is only there for the "dev" mode
// when the file is dynamically loaded. In release mode, the final `Bytes`
// are already stored inside `assets`.
let bytes = assets.get("index.html").unwrap().content().await?;

See the documentation for more information.

Status of this project

While this crate is not used by many projects yet, we use it in production for a couple of years already. 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.

Core symbols most depended-on inside this repo

iter
called by 16
src/lib.rs
add_embedded
called by 15
src/builder.rs
len
called by 12
src/lib.rs
resolve_path
called by 4
src/lib.rs
get
called by 4
src/imp_prod.rs
with_hash
called by 4
src/builder.rs
single_http_path
called by 4
src/builder.rs
http_path
called by 4
src/builder.rs

Shape

Method 61
Class 27
Function 24
Enum 7

Languages

Rust99%
TypeScript1%

Modules by API surface

src/lib.rs20 symbols
src/embed.rs16 symbols
src/builder.rs16 symbols
src/imp_prod.rs13 symbols
src/imp_dev.rs13 symbols
src/dep_graph.rs10 symbols
macros/src/emit.rs8 symbols
macros/src/parse.rs5 symbols
src/hash.rs4 symbols
macros/src/ast.rs3 symbols
tests/main.rs2 symbols
src/util.rs2 symbols

For agents

$ claude mcp add reinda \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page