Compare commits
2 Commits
v1.1.0
...
504d10bccc
Author | SHA1 | Date | |
---|---|---|---|
504d10bccc
|
|||
d9ac349d58
|
913
Cargo.lock
generated
913
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
12
Cargo.toml
12
Cargo.toml
@ -1,18 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "expose-dir-via-http"
|
name = "expose-dir-via-http"
|
||||||
version = "1.1.0"
|
version = "1.0.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lints.rust]
|
|
||||||
unsafe_code = "forbid"
|
|
||||||
|
|
||||||
[lints.clippy]
|
|
||||||
pedantic = { level = "warn", priority = -1 }
|
|
||||||
todo = "warn"
|
|
||||||
unwrap_used = "warn"
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-web = { version = "4" }
|
actix-web = { version = "4", features = ["experimental-io-uring"] }
|
||||||
actix-files = "0.6"
|
actix-files = "0.6"
|
||||||
clap = { version = "4", features = ["cargo", "derive"] }
|
clap = { version = "4", features = ["cargo", "derive"] }
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use std::{
|
use std::{
|
||||||
|
env,
|
||||||
net::{IpAddr, SocketAddr},
|
net::{IpAddr, SocketAddr},
|
||||||
num::NonZeroUsize,
|
|
||||||
thread::available_parallelism,
|
thread::available_parallelism,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ async fn main() -> std::io::Result<()> {
|
|||||||
.prefer_utf8(true),
|
.prefer_utf8(true),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.workers(available_parallelism().map_or(1, NonZeroUsize::get))
|
.workers(available_parallelism().unwrap().get())
|
||||||
.bind(sock)?
|
.bind(sock)?
|
||||||
.run()
|
.run()
|
||||||
.await
|
.await
|
||||||
|
Reference in New Issue
Block a user