rust-embed v8.13.0

#rust#proc-macro#http

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

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


1a71272 — pyros2097 2018-03-02T13:19:25+05:30
make it proc

Generated files not shown: Cargo.lock

Files changed (3) hide show
  1. Cargo.toml +2 -6
  2. LICENSE → license +0 -0
  3. src/lib.rs +2 -2
Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "rust-embed"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  description = "Rust Marco which loads files into the rust binary at compile time during release and loads the file from the fs during dev"
5
5
  readme = "readme.md"
6
6
  documentation = "https://docs.rs/rust-embed"
@@ -11,12 +11,8 @@ categories = ["web-programming::http-server"]
11
11
  authors = ["pyros2097 <[email protected]>"]
12
12
 
13
13
  [lib]
14
- name = "rust_embed"
15
- plugin = true
14
+ proc-macro = true
16
15
 
17
16
  [dependencies]
18
17
  log = "0.4"
19
18
  walkdir = "2.1.4"
20
-
21
- [dev-dependencies]
22
- actix-web = "0.3.3"
LICENSE → license RENAMED
File without changes
src/lib.rs CHANGED
@@ -3,7 +3,7 @@ extern crate log;
3
3
  extern crate walkdir;
4
4
 
5
5
  #[cfg(debug_assertions)]
6
- pub fn generate_assets(parent_path: String) -> Box<Fn(String) -> Option<Vec<u8>>> {
6
+ fn generate_assets(parent_path: String) -> Box<Fn(String) -> Option<Vec<u8>>> {
7
7
  use std::fs::File;
8
8
  use std::path::Path;
9
9
  use std::io::Read;
@@ -32,7 +32,7 @@ pub fn generate_assets(parent_path: String) -> Box<Fn(String) -> Option<Vec<u8>>
32
32
  }
33
33
 
34
34
  #[cfg(not(debug_assertions))]
35
- pub fn generate_assets<'a>(parent_path: String) -> Box<Fn(String) -> Option<Vec<u8>>> {
35
+ fn generate_assets<'a>(parent_path: String) -> Box<Fn(String) -> Option<Vec<u8>>> {
36
36
  use std::fs::File;
37
37
  use std::io::Read;
38
38
  use std::path::Path;