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


41b5a2dd Mcat12

7 years ago
Move the rocket behind a feature flag to run tests on stable
Files changed (2) hide show
  1. Cargo.toml +7 -3
  2. readme.md +5 -0
Cargo.toml CHANGED
@@ -19,13 +19,17 @@ quote = "0.3"
19
19
  log = "0.4"
20
20
  walkdir = "2.1.4"
21
21
 
22
+ rocket = { version = "0.3.6", optional = true }
23
+ rocket_codegen = { version = "0.3.6", optional = true }
24
+ rocket_contrib = { version = "0.3.6", optional = true }
25
+
22
26
  [dev-dependencies]
23
- rocket = "0.3.6"
24
- rocket_codegen = "0.3.6"
25
- rocket_contrib = "0.3.6"
26
27
  rouille = "2.1.0"
27
28
  fern = "0.5"
28
29
 
30
+ [features]
31
+ nightly = ["rocket", "rocket_codegen", "rocket_contrib"]
32
+
29
33
  [badges]
30
34
  appveyor = { repository = "pyros2097/rust-embed" }
31
35
  travis-ci = { repository = "pyros2097/rust-embed" }
readme.md CHANGED
@@ -41,6 +41,11 @@ To run the example in dev mode where it reads from the fs,
41
41
  To run the example in release mode where it reads from binary,
42
42
 
43
43
  `cargo run --release --example basic`
44
+
45
+ Note: To run the `rocket` example, add the `nightly` feature flag and run on a nightly build:
46
+
47
+ `cargo +nightly run --example rocket --features nightly`
48
+
44
49
  ## Testing
45
50
  debug: `cargo test --tests --lib`
46
51