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


a6ac30cd lazywalker

4 years ago
bump warp to 0.3, tokio to 1.0
Files changed (2) hide show
  1. Cargo.toml +3 -4
  2. examples/axum.rs +0 -1
Cargo.toml CHANGED
@@ -49,11 +49,10 @@ rust-embed-utils = { version = "7.0.0", path = "utils"}
49
49
  include-flate = { version = "0.1", optional = true, features = ["stable"] }
50
50
  actix-web = { version = "3", default-features = false, optional = true }
51
51
  mime_guess = { version = "2", optional = true }
52
- tokio = { version = "0.2", optional = true, features = ["macros"] }
52
+ tokio = { version = "1.0", optional = true, features = ["macros", "rt-multi-thread"] }
53
- warp = { version = "0.2", default-features = false, optional = true }
53
+ warp = { version = "0.3", default-features = false, optional = true }
54
54
  rocket = { version = "0.4.5", default-features = false, optional = true }
55
55
  axum = { version = "0.2.3", default-features = false, optional = true }
56
- tokio-1 = { package = "tokio", version = "1.0", features = ["macros", "rt-multi-thread"], optional = true }
57
56
 
58
57
  [dev-dependencies]
59
58
  sha2 = "0.9"
@@ -66,7 +65,7 @@ include-exclude = ["rust-embed-impl/include-exclude"]
66
65
  nightly = ["rocket"]
67
66
  actix = ["actix-web", "mime_guess"]
68
67
  warp-ex = ["warp", "tokio", "mime_guess"]
69
- axum-ex = ["axum", "tokio-1", "mime_guess"]
68
+ axum-ex = ["axum", "tokio", "mime_guess"]
70
69
 
71
70
 
72
71
  [badges]
examples/axum.rs CHANGED
@@ -1,4 +1,3 @@
1
- extern crate tokio_1 as tokio; // just for demo, axum needs tokio-1.x while warp needs tokio-0.2
2
1
  use std::convert::Infallible;
3
2
 
4
3
  use axum::{