~repos /rust-embed

#rust#proc-macro#http

git clone https://pyrossh.dev/repos/rust-embed.git

rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.


91d54812 pyrossh

7 months ago
update info
Files changed (5) hide show
  1. Cargo.toml +3 -7
  2. README.md +25 -12
  3. impl/Cargo.toml +1 -1
  4. renovate.json +0 -5
  5. utils/Cargo.toml +1 -1
Cargo.toml CHANGED
@@ -1,14 +1,14 @@
1
1
  [package]
2
2
  name = "rust-embed"
3
- version = "8.7.0"
3
+ version = "8.7.1"
4
4
  description = "Rust Custom Derive Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev"
5
- readme = "readme.md"
5
+ readme = "README.md"
6
6
  documentation = "https://docs.rs/rust-embed"
7
7
  repository = "https://git.sr.ht/~pyrossh/rust-embed"
8
8
  license = "MIT"
9
9
  keywords = ["http", "rocket", "static", "web", "server"]
10
10
  categories = ["web-programming", "filesystem"]
11
- authors = ["pyros2097 <pyros2097@gmail.com>"]
11
+ authors = ["pyrossh"]
12
12
  edition = "2018"
13
13
  rust-version = "1.70.0"
14
14
 
@@ -107,10 +107,6 @@ deterministic-timestamps = ["rust-embed-impl/deterministic-timestamps"]
107
107
 
108
108
 
109
109
  [badges]
110
- appveyor = { repository = "pyros2097/rust-embed" }
111
- travis-ci = { repository = "pyros2097/rust-embed" }
112
- is-it-maintained-issue-resolution = { repository = "pyros2097/rust-embed" }
113
- is-it-maintained-open-issues = { repository = "pyros2097/rust-embed" }
114
110
  maintenance = { status = "passively-maintained" }
115
111
 
116
112
  [workspace]
README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## Rust Embed [![Build Status](https://github.com/pyros2097/rust-embed/workflows/Test/badge.svg)](https://github.com/pyros2097/rust-embed/actions?query=workflow%3ATest) [![crates.io](https://img.shields.io/crates/v/rust-embed.svg)](https://crates.io/crates/rust-embed)
1
+ ## Rust Embed [![crates.io](https://img.shields.io/crates/v/rust-embed.svg)](https://crates.io/crates/rust-embed)
2
2
 
3
3
  Rust Custom Derive Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
4
4
 
@@ -112,11 +112,11 @@ This will pull the `foo` directory relative to your `Cargo.toml` file.
112
112
 
113
113
  ### `compression`
114
114
 
115
- Compress each file when embedding into the binary. Compression is done via [`include-flate`].
115
+ Compress each file when embedding into the binary. Compression is done via [include-flate](https://crates.io/crates/include-flate).
116
116
 
117
117
  ### `include-exclude`
118
118
  Filter files to be embedded with multiple `#[include = "*.txt"]` and `#[exclude = "*.jpg"]` attributes.
119
- Matching is done on relative file paths, via [`globset`].
119
+ Matching is done on relative file paths, via [globset](https://crates.io/crates/globset).
120
120
  `exclude` attributes have higher priority than `include` attributes.
121
121
  Example:
122
122
 
@@ -195,12 +195,25 @@ Note: To run the [salvo](https://github.com/salvo-rs/salvo) example:
195
195
 
196
196
  ## Testing
197
197
 
198
+ ```sh
198
- debug: `cargo test --test lib`
199
+ cargo test --test lib
199
-
200
+ cargo test --test lib --features "debug-embed"
201
+ cargo test --test lib --features "compression" --release
202
+ cargo test --test mime_guess --features "mime-guess"
203
+ cargo test --test mime_guess --features "mime-guess" --release
204
+ cargo test --test interpolated_path --features "interpolate-folder-path"
205
+ cargo test --test interpolated_path --features "interpolate-folder-path" --release
206
+ cargo test --test custom_crate_path
207
+ cargo test --test custom_crate_path --release
208
+ cargo build --example basic
209
+ cargo build --example rocket --features rocket
210
+ cargo build --example actix --features actix
211
+ cargo build --example axum --features axum-ex
212
+ cargo build --example warp --features warp-ex
200
- release: `cargo test --test lib --release`
213
+ cargo test --test lib --release
201
-
202
- Go Rusketeers!
203
- The power is yours!
214
+ cargo build --example basic --release
204
-
205
- [`include-flate`]: https://crates.io/crates/include-flate
215
+ cargo build --example rocket --features rocket --release
206
- [`globset`]: https://crates.io/crates/globset
216
+ cargo build --example actix --features actix --release
217
+ cargo build --example axum --features axum-ex --release
218
+ cargo build --example warp --features warp-ex --release
219
+ ```
impl/Cargo.toml CHANGED
@@ -8,7 +8,7 @@ repository = "https://git.sr.ht/~pyrossh/rust-embed"
8
8
  license = "MIT"
9
9
  keywords = ["http", "rocket", "static", "web", "server"]
10
10
  categories = ["web-programming::http-server"]
11
- authors = ["pyros2097 <pyros2097@gmail.com>"]
11
+ authors = ["pyrossh"]
12
12
  edition = "2018"
13
13
 
14
14
  [lib]
renovate.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "extends": [
3
- "config:base"
4
- ]
5
- }
utils/Cargo.toml CHANGED
@@ -8,7 +8,7 @@ repository = "https://git.sr.ht/~pyrossh/rust-embed"
8
8
  license = "MIT"
9
9
  keywords = ["http", "rocket", "static", "web", "server"]
10
10
  categories = ["web-programming::http-server"]
11
- authors = ["pyros2097 <pyros2097@gmail.com>"]
11
+ authors = ["pyrossh"]
12
12
  edition = "2018"
13
13
 
14
14
  [dependencies]