~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.


1342ebc0 pyros2097

6 years ago
release v5.2.0 again :(
Files changed (3) hide show
  1. Cargo.toml +1 -1
  2. changelog.md +86 -1
  3. readme.md +2 -1
Cargo.toml CHANGED
@@ -12,7 +12,7 @@ authors = ["pyros2097 <pyros2097@gmail.com>"]
12
12
 
13
13
  [dependencies]
14
14
  walkdir = "2.2.7"
15
- rust-embed-impl = { version = "5.1.0", path = "impl"}
15
+ rust-embed-impl = { version = "5.2.0", path = "impl"}
16
16
  rust-embed-utils = { version = "5.0.0", path = "utils"}
17
17
 
18
18
  actix-web = { version = "1", optional = true }
changelog.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
@@ -6,88 +7,148 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
7
 
7
8
  Thanks to [Mcat12](https://github.com/Mcat12) for the changelog.
8
9
 
10
+ ## [5.2.0] - 2019-12-05
11
+
12
+ ## Changed
13
+
14
+ - updated syn and quote crate to 1.x
15
+
16
+ ## [5.1.0] - 2019-07-09
17
+
18
+ ## Fixed
19
+
20
+ - error when debug code tries to import the utils crate
21
+
9
22
  ## [5.0.1] - 2019-07-07
23
+
10
24
  ## Changed
25
+
11
- - derive is allowed only on unit structs now
26
+ - derive is allowed only on unit structs now
12
27
 
13
28
  ## [5.0.0] - 2019-07-05
29
+
14
30
  ## Added
31
+
15
32
  - proper error message stating only unit structs are supported
33
+
16
34
  ## Fixed
35
+
17
36
  - windows latest build
18
37
 
19
38
  ## [4.5.0] - 2019-06-29
39
+
20
40
  ## Added
41
+
21
42
  - allow rust embed derive to take env variables in the folder path
22
43
 
23
44
  ## [4.4.0] - 2019-05-11
45
+
24
46
  ### Fixed
47
+
25
48
  - a panic when struct has doc comments
49
+
26
50
  ### Added
51
+
27
52
  - a warp example
28
53
 
29
54
  ## [4.3.0] - 2019-01-10
55
+
30
56
  ### Fixed
57
+
31
58
  - debug_embed feature was not working at all
59
+
32
60
  ### Added
61
+
33
62
  - a test run for debug_embed feature
34
63
 
35
64
  ## [4.2.0] - 2018-12-02
65
+
36
66
  ### Changed
67
+
37
68
  - return `Cow<'static, [u8]>` to preserve static lifetime
38
69
 
39
70
  ## [4.1.0] - 2018-10-24
71
+
40
72
  ### Added
73
+
41
74
  - `iter()` method to list files
42
75
 
43
76
  ## [4.0.0] - 2018-10-11
77
+
44
78
  ### Changed
79
+
45
80
  - avoid vector allocation by returning `impl AsRef<[u8]>`
46
81
 
47
82
  ## [3.0.2] - 2018-09-05
83
+
48
84
  ### Added
85
+
49
86
  - appveyor for testing on windows
87
+
50
88
  ### Fixed
89
+
51
90
  - handle paths in windows correctly
52
91
 
53
92
  ## [3.0.1] - 2018-07-24
93
+
54
94
  ### Added
95
+
55
96
  - panic if the folder cannot be found
56
97
 
57
98
  ## [3.0.0] - 2018-06-01
99
+
58
100
  ### Changed
101
+
59
102
  - The derive attribute style so we don't need `attr_literals` and it can be used in stable rust now. Thanks to [Mcat12](https://github.com/Mcat12).
103
+
60
104
  ```rust
61
105
  #[folder("assets/")]
62
106
  ```
107
+
63
108
  to
109
+
64
110
  ```rust
65
111
  #[folder = "assets/"]
66
112
  ```
113
+
67
114
  ### Removed
115
+
68
116
  - log dependecy as we are not using it anymore
69
117
 
70
118
  ## [2.0.0] - 2018-05-26
119
+
71
120
  ### Changed
121
+
72
122
  - Reimplemented the macro for release to use include_bytes for perf sake. Thanks to [lukad](https://github.com/lukad).
73
123
 
74
124
  ## [1.1.1] - 2018-03-19
125
+
75
126
  ### Changed
127
+
76
128
  - Fixed usage error message
77
129
 
78
130
  ## [1.1.0] - 2018-03-19
131
+
79
132
  ### Added
133
+
80
134
  - Release mode for custom derive
135
+
81
136
  ### Changed
137
+
82
138
  - Fixed tests in travis
83
139
 
84
140
  ## [1.0.0] - 2018-03-18
141
+
85
142
  ### Changed
143
+
86
144
  - Converted the rust-embed macro `embed!` into a Rust Custom Derive Macro `#[derive(RustEmbed)]` which implements get on the struct
145
+
87
146
  ```rust
88
147
  let asset = embed!("examples/public/")
89
148
  ```
149
+
90
150
  to
151
+
91
152
  ```rust
92
153
  #[derive(RustEmbed)]
93
154
  #[folder = "examples/public/"]
@@ -95,49 +156,73 @@ struct Asset;
95
156
  ```
96
157
 
97
158
  ## [0.5.2] - 2018-03-16
159
+
98
160
  ### Added
161
+
99
162
  - rouille example
100
163
 
101
164
  ## [0.5.1] - 2018-03-16
165
+
102
166
  ### Removed
167
+
103
168
  - the plugin attribute from crate
104
169
 
105
170
  ## [0.5.0] - 2018-03-16
171
+
106
172
  ### Added
173
+
107
174
  - rocket example
175
+
108
176
  ### Changed
177
+
109
178
  - Converted the rust-embed executable into a macro `embed!` which now loads files at compile time during release and from the fs during dev.
110
179
 
111
180
  ## [0.4.0] - 2017-03-2
181
+
112
182
  ### Changed
183
+
113
184
  - `generate_assets` to public again
114
185
 
115
186
  ## [0.3.5] - 2017-03-2
187
+
116
188
  ### Added
189
+
117
190
  - rust-embed prefix to all logs
118
191
 
119
192
  ## [0.3.4] - 2017-03-2
193
+
120
194
  ### Changed
195
+
121
196
  - the lib to be plugin again
122
197
 
123
198
  ## [0.3.3] - 2017-03-2
199
+
124
200
  ### Changed
201
+
125
202
  - the lib to be proc-macro from plugin
126
203
 
127
204
  ## [0.3.2] - 2017-03-2
205
+
128
206
  ### Changed
207
+
129
208
  - lib name from `rust-embed` to `rust_embed`
130
209
 
131
210
  ## [0.3.1] - 2017-03-2
211
+
132
212
  ### Removed
213
+
133
214
  - hyper example
134
215
 
135
216
  ## [0.3.0] - 2017-02-26
217
+
136
218
  ### Added
219
+
137
220
  - rust-embed executable which generates rust code to embed resource files into your rust executable
138
221
  it creates a file like assets.rs that contains the code for your assets.
139
222
 
140
223
  ## [0.2.0] - 2017-03-16
224
+
141
225
  ### Added
226
+
142
227
  - rust-embed executable which generates rust code to embed resource files into your rust executable
143
228
  it creates a file like assets.rs that contains the code for your assets.
readme.md CHANGED
@@ -16,7 +16,7 @@ You can use this to embed your css, js and images into a single executable which
16
16
 
17
17
  ```toml
18
18
  [dependencies]
19
- rust-embed="5.1.0"
19
+ rust-embed="5.2.0"
20
20
  ```
21
21
 
22
22
  ## Documentation
@@ -81,6 +81,7 @@ Always embed the files in the binary, even in debug mode.
81
81
  ### `interpolate-folder-path`
82
82
 
83
83
  Allow environment variables to be used in the `folder` path. Example:
84
+
84
85
  ```rust
85
86
  #[derive(RustEmbed)]
86
87
  #[folder = "$CARGO_MANIFEST_DIR/foo"]