#rogue-like #cp437 #terminal #ascii #gamedev

bracket-embedding

Provides resource embedding services for bracket-lib

1 unstable release

0.8.7 Oct 4, 2022

#2227 in Game dev

Download history 373/week @ 2024-03-13 557/week @ 2024-03-20 493/week @ 2024-03-27 621/week @ 2024-04-03 534/week @ 2024-04-10 497/week @ 2024-04-17 492/week @ 2024-04-24 462/week @ 2024-05-01 518/week @ 2024-05-08 500/week @ 2024-05-15 593/week @ 2024-05-22 546/week @ 2024-05-29 574/week @ 2024-06-05 414/week @ 2024-06-12 415/week @ 2024-06-19 482/week @ 2024-06-26

1,963 downloads per month
Used in 10 crates (2 directly)

MIT license

83KB
60 lines

Bracket-embedding

bracket-lib includes a system for embedding resources inside your binary (particularly useful for wasm builds). This crate provides the supporting infrastructure for the embedding. It's not a lot of use on its own.

Example of use

use bracket_embedding::prelude::*;

embedded_resource!(SOURCE_FILE, "embedding.rs");

fn main() {
   // This helper macro links the above embedding, allowing it to be accessed as a resource from various parts of the program.
   link_resource!(SOURCE_FILE, "embedding.rs");
}

lib.rs:

The bracket-embedding crate is used to provide resource embedding. This allows you to include binary assets inside your program when shipping, with no external files. This can be especially useful for WASM builds.

For example:

use bracket_embedding::prelude::*;

embedded_resource!(SOURCE_FILE, "embedding.rs");

fn main() {
   // This helper macro links the above embedding, allowing it to be accessed as a resource from various parts of the program.
   link_resource!(SOURCE_FILE, "embedding.rs");
}

This crate isn't very useful on its own, but is heavily used by the other parts of bracket-lib.

Dependencies

~0.4–5.5MB
~11K SLoC