~repos /rust-embed
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.
910f4f35
—
Josh Stone 5 years ago
Use actix_web::main instead of actix_rt
- Cargo.toml +1 -2
- examples/actix.rs +1 -1
Cargo.toml
CHANGED
|
@@ -38,7 +38,6 @@ rust-embed-utils = { version = "5.0.0", path = "utils"}
|
|
|
38
38
|
|
|
39
39
|
include-flate = { version = "0.1", optional = true, features = ["stable"] }
|
|
40
40
|
actix-web = { version = "3", default-features = false, optional = true }
|
|
41
|
-
actix-rt = { version = "1", optional = true }
|
|
42
41
|
mime_guess = { version = "2", optional = true }
|
|
43
42
|
tokio = { version = "0.2", optional = true, features = ["macros"] }
|
|
44
43
|
warp = { version = "0.2", default-features = false, optional = true }
|
|
@@ -49,7 +48,7 @@ debug-embed = ["rust-embed-impl/debug-embed", "rust-embed-utils/debug-embed"]
|
|
|
49
48
|
interpolate-folder-path = ["rust-embed-impl/interpolate-folder-path"]
|
|
50
49
|
compression = ["rust-embed-impl/compression", "include-flate"]
|
|
51
50
|
nightly = ["rocket"]
|
|
52
|
-
actix = ["actix-web", "
|
|
51
|
+
actix = ["actix-web", "mime_guess"]
|
|
53
52
|
warp-ex = ["warp", "tokio", "mime_guess"]
|
|
54
53
|
|
|
55
54
|
[badges]
|
examples/actix.rs
CHANGED
|
@@ -30,7 +30,7 @@ fn dist(path: web::Path<String>) -> HttpResponse {
|
|
|
30
30
|
handle_embedded_file(&path.0)
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
#[
|
|
33
|
+
#[actix_web::main]
|
|
34
34
|
async fn main() -> std::io::Result<()> {
|
|
35
35
|
HttpServer::new(|| {
|
|
36
36
|
App::new()
|